/* eslint-disable */
/* tslint:disable */
/*
 * ---------------------------------------------------------------
 * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API        ##
 * ##                                                           ##
 * ## AUTHOR: acacode                                           ##
 * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
 * ---------------------------------------------------------------
 */

export interface Ingredient {
  id: number;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
}

export interface AddIngredientDto {
  title: string;
}

export type DeleteResult = object;

export interface CheckDTO {
  userId: number;
}

export interface TokenDTO {
  accessToken: string;
  refreshToken: string;
  expiresIn: number;
}

export interface AdminCredentialsUserDto {
  /** @example "test@gmail.com" */
  email: string;
  /** @example "$wfes12adfdafs" */
  password: string;
}

export interface FinishRegistrationUserDto {
  /** @example "test@gmail.com" */
  email: string;
  /** @example "Ge3J4f" */
  code: string;
}

export interface PhoneAuthDTOBody {
  phone: string;
}

export interface PhoneAuthCallbackDTOQuery {
  code: string;
  phone: string;
}

export interface CheckEmailResponseDto {
  /** @example true */
  doesUserExist: boolean;
}

export interface CredentialsBodyDto {
  /** @example "test@gmail.com" */
  email: string;
  /** @example "$wfes12adfdafs" */
  password: string;
}

export interface EmailBodyDto {
  /** @example "test@gmail.com" */
  email: string;
}

export interface UpdationProfileDto {
  name?: string;
  gender?: 'm' | 'f';
  /** @format base64 */
  avatar?: string;
  phone?: string;
  email?: string;
  wayContactId?: number;
}

export interface WayContact {
  id: number;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
}

export interface UpdateProfileBO {
  name: string;
  gender: string;
  avatar: string;
  email: string;
  phone: string;
  wayContact: WayContact;
}

export interface ChildDto {
  id: number;
  name: string;
  avatar: string | null;
  gender: 'm' | 'f';
  birthdate: string;
  feedingStart: string;
  schemaId: number;
}

export type Rating = object;

export interface UserResponseDto {
  name: string;
  gender: 'm' | 'f';
  avatar: string | null;
  email: string | null;
  phone: string | null;
  wayContact: WayContact;
  children: ChildDto[] | null;
  rating: Rating[] | null;
}

export interface UserAuthTypeResponseDto {
  /** @example "phone|google|facebook|yandex|vkontakte|apple|email" */
  authType: string;
}

export interface ChangePasswordDto {
  /** @example "$wfes12adfdafs" */
  oldPassword: string;
  /** @example "$wfes12adfdafs" */
  newPassword: string;
}

export interface CheckPasswordDto {
  /** @example "$wfes12adfdafs" */
  password: string;
}

export interface PasswordCheckDto {
  /** @example true */
  isCorrect: boolean;
}

export interface PasswordBodyDto {
  /** @example "$wfes12adfdafs" */
  password: string;
}

export interface UserDto {
  id: number;
  phone: string;
  isPhoneNumberConfirmed: boolean;
  authType: 'phone' | 'google' | 'facebook' | 'yandex' | 'vkontakte' | 'apple' | 'email';
  email: string;
  /** @format date-time */
  lastActivityAt: string;
  /** @format date-time */
  updatedAt: string;
  /** @format date-time */
  createdAt: string;
  ip: string;
}

export interface ListUserDto {
  users: UserDto[];
}

export interface CityDto {
  /** @example 1 */
  id: number;
  /** @example "city name" */
  name: string;
}

export interface ProfileV2Dto {
  name: string;
  avatar: string;
  city: CityDto;
  familyRole: string;
  /** @format date-time */
  dateOfBirth: string;
  phoneNumber: string;
}

export interface UserWithProfileV2Dto {
  id: number;
  phone: string;
  isPhoneNumberConfirmed: boolean;
  authType: 'phone' | 'google' | 'facebook' | 'yandex' | 'vkontakte' | 'apple' | 'email';
  email: string;
  /** @format date-time */
  lastActivityAt: string;
  /** @format date-time */
  updatedAt: string;
  /** @format date-time */
  createdAt: string;
  ip: string;
  profile: ProfileV2Dto;
  children: ChildDto[];
}

export interface UpdationProfileV2Dto {
  name: string;
  avatar?: string;
  /** @default 1 */
  cityId?: number;
  familyRole?: 'mother' | 'father' | 'grandmother' | 'grandfather' | 'companyNamesitter';
  /** @default "1995-01-15T00:00:00.000Z" */
  dateOfBirth?: date | null;
  phoneNumber?: string;
}

export interface UpdationChildV2Dto {
  /** @example "name" */
  name?: object;
  gender?: 'm' | 'f';
  /** @format date */
  birthdate?: string;
  /**
   * относиться к старой схеме
   * @format date
   * @example "2023-01-22"
   */
  feedingStart?: object;
  /** @example "e4aeb820-0012-472b-8439-861872e17ae1.png" */
  avatar?: string;
}

export interface ChildResponseDto {
  id: number;
  /** @example "name" */
  name: object;
  /** @example "m" */
  gender: object;
  /** @example "e4aeb820-0012-472b-8439-861872e17ae1.png" */
  avatar: object;
  /** @format date */
  birthdate?: string;
  /** @example "2024-04-15" */
  feedingStart: object;
  /** @example "2024-04-15" */
  actualFeedingStart: object;
}

export interface CreationChildHeightDto {
  value: number;
}

export interface ChildHeightDto {
  value: number;
  childId: number;
  /**
   * @format date-time
   * @example "2024-03-03"
   */
  date: string;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
  /** @example "4|null" */
  differenceForPreviousDay: number;
}

export interface ListChildHeightDto {
  heights: ChildHeightDto[];
}

export interface CreationChildWeightDto {
  value: number;
}

export interface ChildWeight {
  value: number;
  childId: number;
  /**
   * @format date-time
   * @example "2024-03-03"
   */
  date: string;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
}

export interface ChildWeightDto {
  value: number;
  childId: number;
  /**
   * @format date-time
   * @example "2024-03-03"
   */
  date: string;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
  /** @example "4|null" */
  differenceForPreviousDay: number;
}

export interface ListChildWeightDto {
  weights: ChildWeightDto[];
}

export interface ChildStatisticProducts {
  total: number;
  used: number;
  differenceForPreviousMonth: number;
}

export interface ChildStatisticFeed {
  /** @example 10 */
  days: object;
  /** @example "2024-03-03" */
  dateStart: object;
}

export interface ChildStatisticCurrentDifference {
  /** @example 10 */
  current: object;
  /** @example 4 */
  differenceForPrevious: object;
  /** @example 3 */
  differenceDays: object;
}

export interface ChildStatisticAllergens {
  /** @example 10 */
  current: number;
  /** @example 5 */
  differenceForPreviousMonth: number;
}

export interface ChildStatisticDto {
  products: ChildStatisticProducts;
  feed: ChildStatisticFeed;
  weight: ChildStatisticCurrentDifference;
  height: ChildStatisticCurrentDifference;
  allergens: ChildStatisticAllergens;
}

export interface ProductTypeDto {
  /** @example "1" */
  id: number;
  /** @example "name" */
  name: string;
}

export interface ProductTypeBodyDto {
  products: ProductTypeDto[];
}

export interface PlanItem {
  weight: number;
  date: string;
}

export interface ReplacedProducts {
  id: number;
  name: string;
  slotName: string;
}

export interface Step {
  id: number;
  /** @default false */
  completed: boolean;
  /** @default true */
  allergen: boolean;
  /** @default false */
  postponed: boolean;
  plan: PlanItem[];
  name: string;
  productTypeId: number;
  productTypeName: string;
  productCategory: string;
  /** @default 1663286400000 */
  lastDayTimestamp: number;
  unitOfMeasure: 'gram' | 'part' | 'ml';
  replacedProducts: ReplacedProducts;
}

export interface SchemaResponseDto {
  currentPausedDate: string;
  steps: Step[];
}

export interface ExcludeProductTypeResponseDto {
  steps: Step[];
}

export interface StepProductTypeResponseDto {
  id: number;
  name: string;
  excluded: boolean;
}

export interface CheckReplacedProductResponseDto {
  replaced: boolean;
}

export interface PostponeStepResponseDto {
  steps: Step[];
}

export interface PostponedStepsDto {
  postponedSteps: Step[];
}

export interface ReturnPostponedStepResponseDto {
  steps: Step[];
}

export interface AllergenBodyDto {
  allergenIds: number[];
}

export interface AllrgenStepsResponseDto {
  allergenedSteps: Step[];
}

export interface ChangeStepAttachedProductTypeBodyDto {
  productTypeId: number;
  excludeCurrent: boolean;
}

export interface ChangeStepAttachedProductTypeResponseDto {
  steps: Step[];
}

export interface Position {
  name: string;
  weight: number;
  unitOfMeasure: 'gram' | 'part' | 'ml';
  supplementary?: string;
  schemaStepId?: number;
  productTypeId: number | null;
}

export interface MenuDayDataItem {
  id: number;
  title: string;
  /** @example "12:00" */
  time: string;
  /** @example "13:00" */
  endTime: string;
  positions: Position[];
  supplementary?: string;
}

export interface MenuDayResponseDto {
  /** @format date */
  date: string;
  data: MenuDayDataItem[];
  isPause: boolean;
}

export interface SchemaPauseBodyDto {
  /** @format date */
  date: string;
}

export interface MealtimesDto {
  /**
   * @format integer
   * @example "1"
   */
  id: number;
  /** @example "title" */
  title: string;
  /** @example "12:00" */
  startTime: string;
  /** @example "14:30" */
  endTime: string;
}

export interface ChangeMealtimeDto {
  /** @example "12:00" */
  startTime: string;
  /** @example "13:30" */
  endTime: string;
  /** @example 1 */
  mealtimeId: number;
}

export interface ChangeMultipleMealtimesBodyDto {
  mealtimes: ChangeMealtimeDto[];
}

export interface FileDto {
  file: string;
}

export interface DeletionMultipleDto {
  ids: number[];
}

export interface CreationFavoriteProductDto {
  productId: number;
}

export interface QuestionAnswer {
  id: number;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
  question: string;
  answer: string;
  order: number;
  questionType: string;
  productId: number;
}

export interface ListQuestionDto {
  questions: QuestionAnswer[];
}

export interface CreationQuestionDto {
  /** @example "question" */
  question: string;
  /** @example "answer" */
  answer: string;
  order: number;
  questionType: string;
}

export interface ActionMultipleResultResponseDto {
  result: any[][];
}

export type ActionMultipleResponseDto = object;

export interface QuestionDto {
  /** @example 1 */
  id: number;
  /** @example "question" */
  question: string;
  /** @example "answer" */
  answer: string;
  /** @example 1 */
  order: number;
  questionType: string;
  /** @example 1 */
  productId: number;
}

export interface BatchCreationQuestionDto {
  questions: CreationQuestionDto[];
}

export interface UpdationQuestionDto {
  /** @example "question" */
  question: string;
  /** @example "answer" */
  answer: string;
  /** @example 1 */
  order: number;
  /** @example "organizational | frequent" */
  questionType: string;
}

export interface UpdationQuestionForBatchDto {
  /** @example "question" */
  question: string;
  /** @example "answer" */
  answer: string;
  /** @example 1 */
  order: number;
  /** @example "organizational | frequent" */
  questionType: string;
  id: number;
}

export interface BatchUpdationQuestionDto {
  questions: UpdationQuestionForBatchDto[];
}

export interface CreationProductMediaDto {
  file: string;
  order?: number;
}

export interface ProductMedia {
  id: number;
  file: string;
  order: number;
  productId: number;
}

export interface BatchCreationProductMediaDto {
  media: CreationProductMediaDto[];
}

export interface UpdationProductMediaDto {
  file: string;
  order?: number;
}

export interface UpdationProductMediaForBatchDto {
  file: string;
  order?: number;
  id: number;
}

export interface BatchUpdationProductMediaDto {
  media: UpdationProductMediaForBatchDto[];
}

export type Number = object;

export interface CreationRatingDto {
  /** @example 5 */
  rate: number;
  /** @example "comment" */
  comment: string | null;
}

export interface ProductInRatingDto {
  /** @example 1 */
  id: number;
  /** @example "title" */
  title: string;
  /** @example "test.png" */
  image: string;
}

export interface RatingDto {
  /** @example 1 */
  id: number;
  /** @example 5 */
  rate: number;
  /** @example "Евгения" */
  name: object;
  /** @example "example example example" */
  comment: object;
  isModerated: boolean;
  /** @format date-time */
  createdAt: string;
  /** @example 1 */
  userId: object;
  product: ProductInRatingDto;
}

export interface UpdationRatingDto {
  /** @example 5 */
  rate?: number;
  /** @example "comment" */
  comment?: string | null;
}

export type Roles = object;

export interface CreationOrderDto {
  /** @example "Евгения" */
  name: string;
  /** @example "+79999999999" */
  phone: string;
  /** @example "test@gmail.com" */
  email: string;
  /** @example 1 */
  productId: number;
  promocode: string;
}

export interface OrderItemResponseDto {
  productId: number;
  /** @example "title" */
  title: string;
  /** @example 1 */
  amount: number;
  /** @example 150 */
  price: number;
  /** @format date-time */
  createdAt: string;
}

export interface OrderResponseDto {
  id: number;
  email: string;
  phone: string;
  name: string;
  /** @format date-time */
  createdAt: string;
  status: string;
  userId: number;
  price: number;
  items: OrderItemResponseDto[];
}

export interface CompanyInNewCourseDto {
  id: number;
  title: string;
  legalTitle: string;
  description: string;
  logo: string;
  inn: string;
  formOrganization: string;
}

export interface CompanyStaff {
  id: number;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
}

export interface ProductV2Dto {
  id: number;
  /** @example "title" */
  title: string;
  /** @example "description" */
  description: string;
  /** @example 200.02 */
  price: number;
  /** @format date-time */
  publishedAt: string;
  discount: number;
  discountPrice: number;
  /** @example "test.png" */
  image: string;
  /** @example 1 */
  superOrder: number;
  /** @example 1 */
  order: number;
  /** @format date-time */
  deletedAt: string;
  /** @example 1 */
  publicationStatusId: number;
  /** @example 5 */
  averageRate: object;
  company: CompanyInNewCourseDto;
  staff: CompanyStaff[];
  media: ProductMedia[];
}

export interface PromocodeAccessType {
  id: number;
  title: string;
}

export interface PromocodeType {
  id: number;
  title: string;
}

export interface PromocodeDto {
  id: number;
  title: string;
  image: string;
  endDate: string | null;
  discountCurrency: 'ruble' | 'percentage';
  discount: number;
  usageCounter: object;
  products: ProductV2Dto[] | null;
  accessType: PromocodeAccessType;
  type: PromocodeType;
  users: UserDto[] | null;
}

export interface OrderStatusDto {
  id: number;
  title: string;
}

export interface AttachmentDto {
  id: number;
  file: string;
  name: string;
  /** @format date-time */
  deletedAt: string;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
}

export interface CourseAtOrderDto {
  id: number;
  attachments: AttachmentDto[];
}

export interface ProductAtOrderDto {
  /** @example 1 */
  id: number;
  /** @example "title" */
  title: string | null;
  /** @example "image.png" */
  image: string;
  /** @format date-time */
  deletedAt: string;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
  course: CourseAtOrderDto;
}

export interface OrderItemDto {
  productId: number;
  product: ProductAtOrderDto;
  title: string;
  amount: number;
  price: number;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
}

export interface OrderV2Dto {
  id: number;
  email: string;
  phone: string;
  name: string;
  totalPrice: number;
  promocode: PromocodeDto;
  emailSend: boolean;
  requestSource: 'mobile' | 'site';
  status: OrderStatusDto;
  userId: number;
  sessionId: string;
  items: OrderItemDto[];
  /** @format date-time */
  createdAt: string;
  userRatingId: number;
}

export interface ListOrderDto {
  orders: OrderV2Dto[];
}

export interface OrderCountPriceDto {
  /** @example "promocode" */
  promocode: string;
  /** @example "1" */
  productId: number;
}

export interface OrderCountPriceResponseDto {
  /** @example 100 */
  price: number;
  discountCurrency: 'ruble' | 'percentage';
  discount: number;
}

export interface ListRatingDto {
  ratings: RatingDto[];
}

export interface CreationAuthorDto {
  name: string;
  avatar: string;
  positionAtWork: string;
}

export interface Author {
  id: number;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
  name: string;
  avatar: string;
  positionAtWork: string;
}

export interface UpdationAuthorDto {
  name: string;
  avatar: string;
  positionAtWork: string;
}

export interface CreationArticleDto {
  title: string;
  body: string;
  image: string;
  /** @example "2023-01-01" */
  publishedAt: string;
  superOrder: number;
  authorId: number;
  formatId: number;
}

export interface Topic {
  id: number;
  title: string;
  order: number;
}

export interface ArticleFormat {
  id: number;
  title: string;
  order: number;
}

export interface PublicationStatus {
  id: number;
  title: string;
}

export interface ArticleDto {
  id: number;
  title: string;
  image: string;
  publishedAt: string;
  /** @format date-time */
  createdAt: string;
  superOrder: number;
  topics: Topic[];
  format: ArticleFormat;
  publicationStatus: PublicationStatus;
  author: Author;
  body: string;
  isFavorite: boolean;
}

export interface UpdationArticleDto {
  title: string;
  body: string;
  image: string;
  /** @example "2023-01-01" */
  publishedAt: string;
  superOrder: number;
  authorId: number;
  formatId: number;
}

export interface PreviewArticleDto {
  id: number;
  title: string;
  image: string;
  publishedAt: string;
  /** @format date-time */
  createdAt: string;
  superOrder: number;
  topics: Topic[];
  format: ArticleFormat;
  publicationStatus: PublicationStatus;
  author: Author;
}

export interface ListArticleDto {
  articles: PreviewArticleDto[];
  count: number;
}

export interface CreationArticleSourceDto {
  title: string;
  link: string;
  order: number;
}

export interface ArticleSource {
  id: number;
  title: string;
  link: string;
  articleId: number;
  order: number;
}

export interface BatchCreationArticleSourceDto {
  sources: CreationArticleSourceDto[];
}

export interface ListArticleSourceDto {
  sources: ArticleSource[];
}

export interface UpdationArticleSourceDto {
  title: string;
  link: string;
  order: number;
}

export interface UpdationArticleSourceForBatchDto {
  title: string;
  link: string;
  order: number;
  id: number;
}

export interface BatchUpdationArticleSourceDto {
  sources: UpdationArticleSourceForBatchDto[];
}

export interface ListArticleFormatDto {
  formats: ArticleFormat[];
}

export interface CreationFavoriteArticleDto {
  articleId: number;
}

export interface CreationCategoryDto {
  name: string;
  /** @format binary */
  image: File;
  /** @format date */
  showUntil?: string;
}

export interface StoryDto {
  id: number;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
  /** @example 0 */
  articleId: number;
  title: string;
  image: string;
  viewsCount: number;
  /** @example "string | null" */
  outer_resource_link: string;
  /** @format date-time */
  showUntil: string;
  categoryId: number;
}

export interface ArticleAtCategoryDto {
  id: number;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
  important: boolean;
  description: string;
  title: string;
  body: string;
  image: string;
  viewsCount: number;
  /** @format date-time */
  showUntil: string;
  categoryId: number;
}

export interface CategoryDto {
  id: number;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
  name: string;
  image: string;
  /** @format date-time */
  showUntil: string;
  stories: StoryDto[];
  articles: ArticleAtCategoryDto[];
}

export interface UpdationCategoryDto {
  name?: string;
  /** @format binary */
  image?: File;
  /** @format date */
  showUntil?: string;
}

export interface ListCategoryDto {
  categories: CategoryDto[];
  categoriesCount: number;
}

export interface ResultCategoryDto {
  category: CategoryDto;
}

export interface CreationStoryDto {
  title: string;
  /** @format binary */
  image: File;
  categoryId: number;
  articleId?: number;
  outer_resource_link?: string;
  /** @format date */
  showUntil?: string;
}

export interface UpdationStoryDto {
  title?: string;
  /** @format binary */
  image?: File;
  categoryId?: number;
  articleId?: number;
  outer_resource_link?: string;
  /** @format date */
  showUntil?: string;
}

export interface ResultStoryDto {
  story: StoryDto;
}

export interface CreationWayContactDto {
  title: string;
  order: number;
}

export interface WayContactResponseDto {
  /** @example 1 */
  id: number;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
  title: string;
  order: number;
}

export interface UpdationWayContactDto {
  title: string;
  order: number;
}

export interface WaysContactWithCountResponseDto {
  waysContact: WayContactResponseDto[];
  waysContactCount: number;
}

export interface RegistrationDto {
  id: number;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
  email: string;
  userId: number;
}

export interface ListRegistrationDto {
  registrations: RegistrationDto[];
}

export interface CreationApplicationPlaceDto {
  title: string;
}

export interface ApplicationPlaceResponseDto {
  /** @example 1 */
  id: number;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
  /** @example "title" */
  title: string;
}

export interface UpdationApplicationPlaceDto {
  title: string;
}

export interface ApplicationPlace {
  id: number;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
}

export interface ListApplicationPlaceDto {
  applicationPlaces: ApplicationPlace[];
  applicationPlaceCount: number;
}

export interface ApplicationTabDto {
  menu: boolean;
  schema: boolean;
  /** @example false */
  marketplace: boolean;
  articles: boolean;
  more: boolean;
}

export interface CreationBannerDto {
  title: string;
  /** @format float */
  height: number;
  /** @format float */
  weight: number;
  /** @format binary */
  image: File;
  /** @format integer */
  placeId: number;
  /** @format date */
  showUntil?: string;
  link?: string;
  /** @format integer */
  articleId?: number;
}

export interface BannerResponseDto {
  title: string;
  /** @format date-time */
  showUntil: string;
  image: string;
  height: number;
  weight: number;
  link: string;
  place: ApplicationPlace;
  articleId: number;
}

export interface UpdationBannerDto {
  title: string;
  /** @format float */
  height: number;
  /** @format float */
  weight: number;
  /** @format binary */
  image: File;
  /** @format integer */
  placeId: number;
  /** @format date */
  showUntil?: string;
  link?: string;
  /** @format integer */
  articleId?: number;
}

export interface WithCountBannersResponseDto {
  banners: BannerResponseDto[];
  bannerCount: number;
}

export interface Recipe {
  id: number;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
  title: string;
  cookingTime: number;
  previewImage: string;
  image: string;
}

export interface ListRecipesDto {
  recipes: Recipe[];
  recipesCount: number;
}

export interface RecipeIngredients {
  id: number;
  quantity: string;
  measure: string;
  ingredient: string;
}

export interface GetRecipeByIdDTO {
  id: number;
  createdAt: string;
  updatedAt: string;
  title: string;
  cookingTime: number;
  instructions: string;
  image: string;
  previewImage: string;
  recipeIngredients: RecipeIngredients[];
  /** @example "3" */
  rating: object;
  isRatedByUser: boolean;
}

export interface RecipeIngredientsForAdmin {
  id: number;
  quantity: number;
  measure: string;
  measureId: number;
  ingredient: string;
  ingredientId: number;
}

export interface GetOneRecipeDto {
  id: number;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
  title: string;
  cookingTime: number;
  instructions: string;
  image: string;
  previewImage: string;
  recipeIngredients: RecipeIngredientsForAdmin[];
}

export interface AdditionIngredientsToRecipeDto {
  quantity: number;
  ingredientId: number;
  measureId: number;
}

export interface CreationRecipeDto {
  title: string;
  cookingTime: number;
  instructions: string;
  image: string;
  previewImage: string;
  recipeIngredients: AdditionIngredientsToRecipeDto[];
}

export interface UpdationIngredientsToRecipeDto {
  id: number;
  quantity: number;
  ingredientId: number;
  measureId: number;
}

export interface UpdateRecipeDtoBody {
  title: string;
  cookingTime: number;
  instructions: string;
  image: string;
  previewImage: string;
  recipeIngredients: UpdationIngredientsToRecipeDto[];
}

export interface CreationCompanyDto {
  title: string;
  /** @example "description" */
  description?: string;
  logo: string;
}

export interface CompanyDto {
  /** @example 1 */
  id: number;
  /** @example "title" */
  title: string;
  /** @example "description" */
  description: string;
  /** @example "test.png" */
  logo: string;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
  /** @format date-time */
  deletedAt: string;
  publicationStatus: PublicationStatus;
}

export interface ListCompanyDto {
  companies: CompanyDto[];
}

export interface CreationStaffDto {
  /** @example "Евгений" */
  name?: object;
  avatar: object;
  /** @example 1 */
  order: number;
  /** @example "Спикер" */
  positionAtWork?: object;
}

export interface StaffDto {
  /** @example 1 */
  id: number;
  /** @example "test" */
  name: object;
  avatar: string;
  /** @example "test" */
  positionAtWork: object;
  /** @example 1 */
  order: number;
  /** @example 1 */
  companyId: number;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
}

export interface BatchCreationStaffDto {
  staff: CreationStaffDto[];
}

export interface UpdationStaffDto {
  /** @example "Евгений" */
  name?: object;
  avatar: object;
  /** @example 1 */
  order: number;
  /** @example "Спикер" */
  positionAtWork?: object;
}

export interface UpdationStaffForBatchDto {
  /** @example "Евгений" */
  name?: object;
  avatar: object;
  /** @example 1 */
  order: number;
  /** @example "Спикер" */
  positionAtWork?: object;
  id: number;
}

export interface BatchUpdationStaffDto {
  staff: UpdationStaffForBatchDto[];
}

export interface ListStaffDto {
  staff: StaffDto[];
}

export interface CourseContent {
  id: number;
  title: string;
  description: string;
  place: string;
  order: number;
}

export interface ListCourseContentDto {
  contents: CourseContent[];
}

export interface CreationCourseContentDto {
  title: string;
  description: string;
  place: string;
  order: number;
}

export interface BatchCreationCourseContentDto {
  contents: CreationCourseContentDto[];
}

export interface UpdationCourseContentDto {
  title: string;
  description: string;
  place: string;
  order: number;
}

export interface UpdationCourseContentForBatchDto {
  title: string;
  description: string;
  place: string;
  order: number;
  id: number;
}

export interface BatchUpdationCourseContentdto {
  contents: UpdationCourseContentForBatchDto[];
}

export interface CourseAttachment {
  id: number;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
  file: string;
  name: string;
  courseId: number;
}

export interface ListCourseAttachmentDto {
  attachments: CourseAttachment[];
}

export interface CreationCourseAttachmentDto {
  file: string;
  name: string;
}

export interface BatchCreationCourseAttachmentDto {
  attachments: CreationCourseAttachmentDto[];
}

export interface CreationProductDto {
  title: string;
  description: string;
  price: number;
  /** @format date-time */
  publishedAt: string;
  image: string;
  companyId: number;
  discountPrice: number;
  superOrder: number;
}

export interface CreationCourseDto {
  product: CreationProductDto;
  formatId: number;
  videoLink: string;
}

export interface CourseFormat {
  id: number;
  title: string;
}

export interface CourseDto {
  /** @example 1 */
  id: number;
  videoLink: string;
  /** @example true */
  hasAttachments: boolean;
  format: CourseFormat;
  topics: Topic[];
  product: ProductV2Dto;
  /** @example null */
  isFavorite: object;
  /** @example true */
  isBought: object;
  /** @example 1 */
  userRatingId: object;
}

export interface UpdationProductDto {
  title: string;
  description: string;
  price: number;
  /** @format date-time */
  publishedAt: string;
  image: string;
  companyId: number;
  discountPrice: number;
  superOrder: number;
}

export interface UpdationCourseDto {
  product: UpdationProductDto;
  formatId: number;
  videoLink: string;
}

export interface ProductInNewPreviewDto {
  /** @example 1 */
  id: number;
  /** @example "title" */
  title: string;
  /** @example "description" */
  description: string;
  /** @example 200.02 */
  price: number;
  /** @example 25 */
  discount: number;
  /** @format date-time */
  publishedAt: string;
  /** @example 200.02 */
  discountPrice: number;
  /** @example "test.png" */
  image: string;
  /** @example 1 */
  superOrder: number;
  /** @example 1 */
  order: number;
  /** @format date-time */
  deletedAt: string;
  /** @example 1 */
  companyId: number;
  /** @example 1 */
  publicationStatusId: number;
  /** @example 5 */
  averageRate: number;
}

export interface PreviewCourseV2Dto {
  id: number;
  /** @format date-time */
  createdAt: string;
  /** @format date-time */
  updatedAt: string;
  /** @example "test" */
  videoLink: string;
  /** @example "https://www.youtube.com/ | asdfwefw.pdf" */
  userAgreement: string;
  /** @example 1 */
  formatId: number;
  product: ProductInNewPreviewDto;
}

export interface ListCourseDto {
  courses: PreviewCourseV2Dto[];
  count: number;
}

export interface ListCourseFormatDto {
  formats: CourseFormat[];
}

export interface ListTopicDto {
  topics: Topic[];
}

export interface SendMailDto {
  theme: string;
  email: string;
  message: string;
}

export interface SendMailFromLandingBodyDto {
  name: string;
  email: string;
  message: string;
}

export type TinkoffCallbackBodyDto = object;

export interface CreationPromocodeDto {
  title: object;
  /**
   * @format date
   * @example "2024-09-25"
   */
  endDate: object | null;
  discountCurrency: 'ruble' | 'percentage';
  /** @example "10" */
  discount: number;
  productsId: number[] | null;
  usersId: number[] | null;
  /** @example "1" */
  accessTypeId: number;
  /** @example "1" */
  typeId: number;
}

export interface UpdationPromocodeDto {
  title: string;
  /**
   * @format date
   * @example "2024-09-25"
   */
  endDate: object | null;
  discountCurrency: 'ruble' | 'percentage';
  /** @example "10" */
  discount: number;
  productsId: number[] | null;
  usersId: number[] | null;
  /** @example "1" */
  accessTypeId: number;
  /** @example "1" */
  typeId: number;
}

export interface ListPromocodeDto {
  promocodes: PromocodeDto[];
}

export interface ListPromocodeTypeDto {
  types: PromocodeType[];
}

export interface ListPromocodeAccessTypeDto {
  accessTypes: PromocodeAccessType[];
}

export interface StatisticsDto {
  /** @example "registrations|users|orders" */
  type: 'registrations' | 'users' | 'orders';
  amount: number;
  differenceForPreviousPeriod: number;
}

export interface ListStatisticsDto {
  statistics: StatisticsDto[];
}

export interface CreationAvatarDto {
  file: string;
}

export interface AvatarDto {
  id: number;
  file: string;
}

export interface ContainerAvatarDto {
  avatar: AvatarDto;
}

export interface ListAvatarDto {
  avatars: ContainerAvatarDto[];
}

export interface ListCityDto {
  cities: CityDto[];
}

export interface CreationCityDto {
  name: string;
}

export type QueryParamsType = Record<string | number, any>;
export type ResponseFormat = keyof Omit<Body, 'body' | 'bodyUsed'>;

export interface FullRequestParams extends Omit<RequestInit, 'body'> {
  /** set parameter to `true` for call `securityWorker` for this request */
  secure?: boolean;
  /** request path */
  path: string;
  /** content type of request body */
  type?: ContentType;
  /** query params */
  query?: QueryParamsType;
  /** format of response (i.e. response.json() -> format: "json") */
  format?: ResponseFormat;
  /** request body */
  body?: unknown;
  /** base url */
  baseUrl?: string;
  /** request cancellation token */
  cancelToken?: CancelToken;
}

export type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>;

export interface ApiConfig<SecurityDataType = unknown> {
  baseUrl?: string;
  baseApiParams?: Omit<RequestParams, 'baseUrl' | 'cancelToken' | 'signal'>;
  securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
  customFetch?: typeof fetch;
}

export interface HttpResponse<D extends unknown, E extends unknown = unknown> extends Response {
  data: D;
  error: E;
}

type CancelToken = Symbol | string | number;

export enum ContentType {
  Json = 'application/json',
  FormData = 'multipart/form-data',
  UrlEncoded = 'application/x-www-form-urlencoded',
  Text = 'text/plain',
}

export class HttpClient<SecurityDataType = unknown> {
  public baseUrl: string = '';
  private securityData: SecurityDataType | null = null;
  private securityWorker?: ApiConfig<SecurityDataType>['securityWorker'];
  private abortControllers = new Map<CancelToken, AbortController>();
  private customFetch = (...fetchParams: Parameters<typeof fetch>) => fetch(...fetchParams);

  private baseApiParams: RequestParams = {
    credentials: 'same-origin',
    headers: {},
    redirect: 'follow',
    referrerPolicy: 'no-referrer',
  };

  constructor(apiConfig: ApiConfig<SecurityDataType> = {}) {
    Object.assign(this, apiConfig);
  }

  public setSecurityData = (data: SecurityDataType | null) => {
    this.securityData = data;
  };

  protected encodeQueryParam(key: string, value: any) {
    const encodedKey = encodeURIComponent(key);
    return `${encodedKey}=${encodeURIComponent(typeof value === 'number' ? value : `${value}`)}`;
  }

  protected addQueryParam(query: QueryParamsType, key: string) {
    return this.encodeQueryParam(key, query[key]);
  }

  protected addArrayQueryParam(query: QueryParamsType, key: string) {
    const value = query[key];
    return value.map((v: any) => this.encodeQueryParam(key, v)).join('&');
  }

  protected toQueryString(rawQuery?: QueryParamsType): string {
    const query = rawQuery || {};
    const keys = Object.keys(query).filter((key) => 'undefined' !== typeof query[key]);
    return keys
      .map((key) => (Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key)))
      .join('&');
  }

  protected addQueryParams(rawQuery?: QueryParamsType): string {
    const queryString = this.toQueryString(rawQuery);
    return queryString ? `?${queryString}` : '';
  }

  private contentFormatters: Record<ContentType, (input: any) => any> = {
    [ContentType.Json]: (input: any) =>
      input !== null && (typeof input === 'object' || typeof input === 'string') ? JSON.stringify(input) : input,
    [ContentType.Text]: (input: any) => (input !== null && typeof input !== 'string' ? JSON.stringify(input) : input),
    [ContentType.FormData]: (input: any) =>
      Object.keys(input || {}).reduce((formData, key) => {
        const property = input[key];
        formData.append(
          key,
          property instanceof Blob
            ? property
            : typeof property === 'object' && property !== null
            ? JSON.stringify(property)
            : `${property}`,
        );
        return formData;
      }, new FormData()),
    [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input),
  };

  protected mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams {
    return {
      ...this.baseApiParams,
      ...params1,
      ...(params2 || {}),
      headers: {
        ...(this.baseApiParams.headers || {}),
        ...(params1.headers || {}),
        ...((params2 && params2.headers) || {}),
      },
    };
  }

  protected createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => {
    if (this.abortControllers.has(cancelToken)) {
      const abortController = this.abortControllers.get(cancelToken);
      if (abortController) {
        return abortController.signal;
      }
      return void 0;
    }

    const abortController = new AbortController();
    this.abortControllers.set(cancelToken, abortController);
    return abortController.signal;
  };

  public abortRequest = (cancelToken: CancelToken) => {
    const abortController = this.abortControllers.get(cancelToken);

    if (abortController) {
      abortController.abort();
      this.abortControllers.delete(cancelToken);
    }
  };

  public request = async <T = any, E = any>({
    body,
    secure,
    path,
    type,
    query,
    format,
    baseUrl,
    cancelToken,
    ...params
  }: FullRequestParams): Promise<HttpResponse<T, E>> => {
    const secureParams =
      ((typeof secure === 'boolean' ? secure : this.baseApiParams.secure) &&
        this.securityWorker &&
        (await this.securityWorker(this.securityData))) ||
      {};
    const requestParams = this.mergeRequestParams(params, secureParams);
    const queryString = query && this.toQueryString(query);
    const payloadFormatter = this.contentFormatters[type || ContentType.Json];
    const responseFormat = format || requestParams.format;

    return this.customFetch(`${baseUrl || this.baseUrl || ''}${path}${queryString ? `?${queryString}` : ''}`, {
      ...requestParams,
      headers: {
        ...(requestParams.headers || {}),
        ...(type && type !== ContentType.FormData ? { 'Content-Type': type } : {}),
      },
      signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
      body: typeof body === 'undefined' || body === null ? null : payloadFormatter(body),
    }).then(async (response) => {
      const r = response as HttpResponse<T, E>;
      r.data = null as unknown as T;
      r.error = null as unknown as E;

      const data = !responseFormat
        ? r
        : await response[responseFormat]()
            .then((data) => {
              if (r.ok) {
                r.data = data;
              } else {
                r.error = data;
              }
              return r;
            })
            .catch((e) => {
              r.error = e;
              return r;
            });

      if (cancelToken) {
        this.abortControllers.delete(cancelToken);
      }

      if (!response.ok) throw data;
      return data;
    });
  };
}

/**
 * @title companyName
 * @version 1.0
 * @contact
 */
export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
  config = {
    /**
     * No description
     *
     * @tags Config
     * @name AppControllerGet
     * @request GET:/config
     */
    appControllerGet: (params: RequestParams = {}) =>
      this.request<
        {
          config?: {
            minRequiredVersion?: string;
          };
        },
        any
      >({
        path: `/config`,
        method: 'GET',
        format: 'json',
        ...params,
      }),
  };
  ingredients = {
    /**
     * No description
     *
     * @tags Ingredients
     * @name IngredientsControllerGetAll
     * @summary Get all ingredients
     * @request GET:/ingredients
     * @secure
     */
    ingredientsControllerGetAll: (params: RequestParams = {}) =>
      this.request<Ingredient[], any>({
        path: `/ingredients`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Ingredients
     * @name IngredientsControllerAddProduct
     * @summary add new ingredient in list
     * @request POST:/ingredients
     * @secure
     */
    ingredientsControllerAddProduct: (data: AddIngredientDto, params: RequestParams = {}) =>
      this.request<Ingredient, any>({
        path: `/ingredients`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Ingredients
     * @name IngredientsControllerDeleteProduct
     * @summary delete ingredient
     * @request DELETE:/ingredients/{id}
     * @secure
     */
    ingredientsControllerDeleteProduct: (id: number, params: RequestParams = {}) =>
      this.request<DeleteResult, any>({
        path: `/ingredients/${id}`,
        method: 'DELETE',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Ingredients
     * @name IngredientsControllerUpdateIngredient
     * @summary update ingredient
     * @request PUT:/ingredients/{id}
     * @secure
     */
    ingredientsControllerUpdateIngredient: (id: number, data: AddIngredientDto, params: RequestParams = {}) =>
      this.request<Ingredient, any>({
        path: `/ingredients/${id}`,
        method: 'PUT',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),
  };
  auth = {
    /**
     * @description Exchange the code received from oauth provider for a token
     *
     * @tags Auth
     * @name AuthControllerOauthCallback
     * @summary oauth callback
     * @request PUT:/auth/signin/oauth/callback
     */
    authControllerOauthCallback: (
      query: {
        code: string;
      },
      params: RequestParams = {},
    ) =>
      this.request<void, any>({
        path: `/auth/signin/oauth/callback`,
        method: 'PUT',
        query: query,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Auth
     * @name AuthControllerCheck
     * @summary check access token
     * @request GET:/auth/check
     * @secure
     */
    authControllerCheck: (params: RequestParams = {}) =>
      this.request<CheckDTO, any>({
        path: `/auth/check`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Auth
     * @name AuthControllerSignOut
     * @summary sign out
     * @request PUT:/auth/signout
     * @secure
     */
    authControllerSignOut: (params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/auth/signout`,
        method: 'PUT',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Auth
     * @name AuthControllerRefreshToken
     * @summary get new access-token and refresh-token
     * @request PUT:/auth/refresh-token
     */
    authControllerRefreshToken: (
      query: {
        refreshToken: string;
      },
      params: RequestParams = {},
    ) =>
      this.request<TokenDTO, any>({
        path: `/auth/refresh-token`,
        method: 'PUT',
        query: query,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Auth
     * @name AuthControllerRegistrateUser
     * @summary start registrating User
     * @request POST:/auth/registration
     */
    authControllerRegistrateUser: (data: AdminCredentialsUserDto, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/auth/registration`,
        method: 'POST',
        body: data,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Auth
     * @name AuthControllerFinishRegistration
     * @summary finish registrating User
     * @request PUT:/auth/registration/confirm-email
     */
    authControllerFinishRegistration: (data: FinishRegistrationUserDto, params: RequestParams = {}) =>
      this.request<TokenDTO, any>({
        path: `/auth/registration/confirm-email`,
        method: 'PUT',
        body: data,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Auth
     * @name AuthControllerSignIn
     * @summary sign in
     * @request PUT:/auth/signin
     */
    authControllerSignIn: (data: AdminCredentialsUserDto, params: RequestParams = {}) =>
      this.request<TokenDTO, any>({
        path: `/auth/signin`,
        method: 'PUT',
        body: data,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Redirects to google to verify user identity, then redirects back to front redirect url with code. The code must be sent to oauth callback endpoint to receive the token
     *
     * @tags Auth
     * @name GoogleControllerGoogleAuth
     * @summary start oauth by google
     * @request GET:/auth/signin/oauth/google
     */
    googleControllerGoogleAuth: (params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/auth/signin/oauth/google`,
        method: 'GET',
        ...params,
      }),

    /**
     * @description Redirects to facebook to verify user identity, then redirects back to front redirect url with code. The code must be sent to oauth callback endpoint to receive the token
     *
     * @tags Auth
     * @name FacebookControllerFacebookAuth
     * @summary start oauth by facebook
     * @request GET:/auth/signin/oauth/facebook
     */
    facebookControllerFacebookAuth: (params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/auth/signin/oauth/facebook`,
        method: 'GET',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Auth
     * @name PhoneControllerPhoneAuth
     * @summary phone number auth
     * @request POST:/auth/signin/phone
     */
    phoneControllerPhoneAuth: (data: PhoneAuthDTOBody, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/auth/signin/phone`,
        method: 'POST',
        body: data,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Auth
     * @name PhoneControllerPhoneAuthCallback
     * @summary phone number auth callback
     * @request PUT:/auth/signin/phone/callback
     */
    phoneControllerPhoneAuthCallback: (data: PhoneAuthCallbackDTOQuery, params: RequestParams = {}) =>
      this.request<TokenDTO, any>({
        path: `/auth/signin/phone/callback`,
        method: 'PUT',
        body: data,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Redirects to vkontakte to verify user identity, then redirects back to front redirect url with code. The code must be sent to oauth callback endpoint to receive the token
     *
     * @tags Auth
     * @name VkControllerVkAuth
     * @summary Start oauth by vkontakte
     * @request GET:/auth/signin/oauth/vk
     */
    vkControllerVkAuth: (params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/auth/signin/oauth/vk`,
        method: 'GET',
        ...params,
      }),

    /**
     * @description Redirects to yandex to verify user identity, then redirects back to front redirect url with code. The code must be sent to oauth callback endpoint to receive the token
     *
     * @tags Auth
     * @name YandexControllerYandexAuth
     * @summary Start oauth by yandex
     * @request GET:/auth/signin/oauth/yandex
     */
    yandexControllerYandexAuth: (params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/auth/signin/oauth/yandex`,
        method: 'GET',
        ...params,
      }),

    /**
     * @description Redirects to yandex to verify user identity, then redirects back to front redirect url with code. The code must be sent to oauth callback endpoint to receive the token
     *
     * @tags Auth
     * @name AppleControllerAppleAuth
     * @summary Start oauth by apple
     * @request GET:/auth/signin/oauth/apple
     */
    appleControllerAppleAuth: (params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/auth/signin/oauth/apple`,
        method: 'GET',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Auth
     * @name EmailControllerCheckEmail
     * @summary Проверка зарегистрирована ли почта(для входа по почте)
     * @request GET:/auth/email/check
     */
    emailControllerCheckEmail: (
      query: {
        /** @example "test@gmail.com" */
        email: string;
      },
      params: RequestParams = {},
    ) =>
      this.request<CheckEmailResponseDto, any>({
        path: `/auth/email/check`,
        method: 'GET',
        query: query,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Auth
     * @name EmailControllerSignInByEmail
     * @summary Вход по почте
     * @request POST:/auth/email/singin
     */
    emailControllerSignInByEmail: (data: CredentialsBodyDto, params: RequestParams = {}) =>
      this.request<TokenDTO, any>({
        path: `/auth/email/singin`,
        method: 'POST',
        body: data,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Auth
     * @name EmailControllerRegister
     * @summary Регистрация по почте
     * @request POST:/auth/email/register
     */
    emailControllerRegister: (data: CredentialsBodyDto, params: RequestParams = {}) =>
      this.request<TokenDTO, any>({
        path: `/auth/email/register`,
        method: 'POST',
        body: data,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description На указанную почту отправляется пароль
     *
     * @tags Auth
     * @name EmailControllerRestorePassword
     * @summary Генерация нового пароля (для входа по почте)
     * @request POST:/auth/email/restore
     */
    emailControllerRestorePassword: (data: EmailBodyDto, params: RequestParams = {}) =>
      this.request<TokenDTO, any>({
        path: `/auth/email/restore`,
        method: 'POST',
        body: data,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),
  };
  v2 = {
    /**
     * No description
     *
     * @tags Auth
     * @name PhoneControllerPhoneAuthV2
     * @summary phone number auth
     * @request POST:/v2/auth/signin/phone
     */
    phoneControllerPhoneAuthV2: (data: PhoneAuthDTOBody, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/v2/auth/signin/phone`,
        method: 'POST',
        body: data,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Articles
     * @name ArticleV2ControllerCreate
     * @summary Создание статьи
     * @request POST:/v2/articles
     * @secure
     */
    articleV2ControllerCreate: (data: CreationArticleDto, params: RequestParams = {}) =>
      this.request<ArticleDto, any>({
        path: `/v2/articles`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Articles
     * @name ArticleV2ControllerList
     * @summary Получение списка статей
     * @request GET:/v2/articles
     */
    articleV2ControllerList: (
      query?: {
        limit?: number;
        offset?: number;
        search?: string;
        'orderBy[publishedAt]'?: 'DESC' | 'ASC';
        'filters[topics]'?: string;
        'filters[formats]'?: string;
        'filters[publicationStatusId]'?: number;
        /** @example "2023-02-02" */
        'filters[maxPublishedAt]'?: string;
        /** @example "2023-02-02" */
        'filters[minPublishedAt]'?: string;
      },
      params: RequestParams = {},
    ) =>
      this.request<ListArticleDto, any>({
        path: `/v2/articles`,
        method: 'GET',
        query: query,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Articles
     * @name ArticleV2ControllerUpdate
     * @summary Обновление статьи
     * @request PATCH:/v2/articles/{id}
     * @secure
     */
    articleV2ControllerUpdate: (id: number, data: UpdationArticleDto, params: RequestParams = {}) =>
      this.request<ArticleDto, any>({
        path: `/v2/articles/${id}`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Articles
     * @name ArticleV2ControllerGet
     * @summary Получение статьи
     * @request GET:/v2/articles/{id}
     */
    articleV2ControllerGet: (id: number, params: RequestParams = {}) =>
      this.request<ArticleDto, any>({
        path: `/v2/articles/${id}`,
        method: 'GET',
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Articles
     * @name ArticleV2ControllerDelete
     * @summary Удаление статьи
     * @request DELETE:/v2/articles/{id}
     * @secure
     */
    articleV2ControllerDelete: (id: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/v2/articles/${id}`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Articles
     * @name ArticleV2ControllerSetViewed
     * @summary Добавление статьи в просмотренные
     * @request POST:/v2/articles/{id}:setViewed
     * @secure
     */
    articleV2ControllerSetViewed: (id: number, setViewed: string, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/v2/articles/${id}${setViewed}`,
        method: 'POST',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Articles
     * @name ArticleV2ControllerCreateAritcleSource
     * @summary Добавление источника к статье
     * @request POST:/v2/articles/{articleId}/sources
     * @secure
     */
    articleV2ControllerCreateAritcleSource: (
      articleId: number,
      data: CreationArticleSourceDto,
      params: RequestParams = {},
    ) =>
      this.request<ArticleSource, any>({
        path: `/v2/articles/${articleId}/sources`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Articles
     * @name ArticleV2ControllerListAritcleSource
     * @summary Получение источников статьи
     * @request GET:/v2/articles/{articleId}/sources
     */
    articleV2ControllerListAritcleSource: (articleId: number, params: RequestParams = {}) =>
      this.request<ListArticleSourceDto, any>({
        path: `/v2/articles/${articleId}/sources`,
        method: 'GET',
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Articles
     * @name ArticleV2ControllerCreateAritcleSourceBatch
     * @summary Добавление источников к статье пачкой
     * @request POST:/v2/articles/{articleId}/sources:batchCreate
     * @secure
     */
    articleV2ControllerCreateAritcleSourceBatch: (
      articleId: number,
      batchCreate: string,
      data: BatchCreationArticleSourceDto,
      params: RequestParams = {},
    ) =>
      this.request<
        ActionMultipleResultResponseDto & {
          result?: {
            /** @example true */
            isExecuted?: boolean;
            entity?: ArticleSource;
            /** @example "{ "statusCode": 400, "message": { "propertyName": { "error": "propertyName must be an integer number"}}}" */
            error?: obj | null;
            /**
             * @format integer
             * @example 400
             */
            status?: number | null;
          }[];
        },
        any
      >({
        path: `/v2/articles/${articleId}/sources${batchCreate}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Articles
     * @name ArticleV2ControllerUpdateAritcleSource
     * @summary Обновление источника статьи
     * @request PATCH:/v2/articles/{articleId}/sources/{id}
     * @secure
     */
    articleV2ControllerUpdateAritcleSource: (
      id: number,
      articleId: number,
      data: UpdationArticleSourceDto,
      params: RequestParams = {},
    ) =>
      this.request<ArticleSource, any>({
        path: `/v2/articles/${articleId}/sources/${id}`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Articles
     * @name ArticleV2ControllerDeleteAritcleSource
     * @summary Удаление источника статьи
     * @request DELETE:/v2/articles/{articleId}/sources/{id}
     * @secure
     */
    articleV2ControllerDeleteAritcleSource: (id: number, articleId: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/v2/articles/${articleId}/sources/${id}`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Articles
     * @name ArticleV2ControllerUpdateArticleSourceBatch
     * @summary Обновление источников статьи пачкой
     * @request POST:/v2/articles/{articleId}/sources:batchUpdate
     * @secure
     */
    articleV2ControllerUpdateArticleSourceBatch: (
      articleId: number,
      batchUpdate: string,
      data: BatchUpdationArticleSourceDto,
      params: RequestParams = {},
    ) =>
      this.request<
        ActionMultipleResultResponseDto & {
          result?: {
            /** @example true */
            isExecuted?: boolean;
            entity?: ArticleSource;
            /** @example "{ "statusCode": 400, "message": { "propertyName": { "error": "propertyName must be an integer number"}}}" */
            error?: obj | null;
            /**
             * @format integer
             * @example 400
             */
            status?: number | null;
          }[];
        },
        any
      >({
        path: `/v2/articles/${articleId}/sources${batchUpdate}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Articles
     * @name ArticleV2ControllerDeleteArticleSourceBatch
     * @summary Удаление источников статьи пачкой
     * @request POST:/v2/articles/{articleId}/sources:batchDelete
     * @secure
     */
    articleV2ControllerDeleteArticleSourceBatch: (
      articleId: number,
      batchDelete: string,
      data: DeletionMultipleDto,
      params: RequestParams = {},
    ) =>
      this.request<
        ActionMultipleResultResponseDto & {
          result?: {
            /** @example true */
            isExecuted?: boolean;
            entity?: ArticleSource;
            /** @example "{ "statusCode": 400, "message": { "propertyName": { "error": "propertyName must be an integer number"}}}" */
            error?: obj | null;
            /**
             * @format integer
             * @example 400
             */
            status?: number | null;
          }[];
        },
        any
      >({
        path: `/v2/articles/${articleId}/sources${batchDelete}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Articles
     * @name ArticleV2ControllerSetStatusPublished
     * @summary Смена статуса статьи на Опубликовано
     * @request POST:/v2/articles/{id}:publish
     * @secure
     */
    articleV2ControllerSetStatusPublished: (id: number, publish: string, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/v2/articles/${id}${publish}`,
        method: 'POST',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Articles
     * @name ArticleV2ControllerSetStatusNotPublished
     * @summary Смена статуса статьи на Не опубликовано
     * @request POST:/v2/articles/{id}:hide
     * @secure
     */
    articleV2ControllerSetStatusNotPublished: (id: number, hide: string, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/v2/articles/${id}${hide}`,
        method: 'POST',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Articles
     * @name ArticleV2ControllerAddTopicsToArticleBatch
     * @summary Добавление тем к статье пачкой
     * @request POST:/v2/articles/{articleId}/topics:batchAdd
     * @secure
     */
    articleV2ControllerAddTopicsToArticleBatch: (
      articleId: number,
      batchAdd: string,
      data: DeletionMultipleDto,
      params: RequestParams = {},
    ) =>
      this.request<void, any>({
        path: `/v2/articles/${articleId}/topics${batchAdd}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Articles
     * @name ArticleV2ControllerRemoveTopicsFromArticleBatch
     * @summary Исключение тем из статьи пачкой
     * @request POST:/v2/articles/{articleId}/topics:batchRemove
     * @secure
     */
    articleV2ControllerRemoveTopicsFromArticleBatch: (
      articleId: number,
      batchRemove: string,
      data: DeletionMultipleDto,
      params: RequestParams = {},
    ) =>
      this.request<void, any>({
        path: `/v2/articles/${articleId}/topics${batchRemove}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),
  };
  user = {
    /**
     * No description
     *
     * @tags User
     * @name UsersControllerUpdateProfile
     * @summary update user profile
     * @request PATCH:/user/profile
     * @secure
     */
    usersControllerUpdateProfile: (data: UpdationProfileDto, params: RequestParams = {}) =>
      this.request<UpdateProfileBO, any>({
        path: `/user/profile`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.FormData,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags User
     * @name UsersControllerDeleteProfile
     * @summary delete user and user profile (dev only)
     * @request DELETE:/user/profile
     * @secure
     */
    usersControllerDeleteProfile: (params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/user/profile`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags User
     * @name UsersControllerGetUser
     * @summary get user profile with children
     * @request GET:/user
     * @secure
     */
    usersControllerGetUser: (params: RequestParams = {}) =>
      this.request<UserResponseDto, any>({
        path: `/user`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags User
     * @name UsersControllerGetUserAuthType
     * @summary Получение типа авторизации пользователя
     * @request GET:/user/auth-type
     * @secure
     */
    usersControllerGetUserAuthType: (params: RequestParams = {}) =>
      this.request<UserAuthTypeResponseDto, any>({
        path: `/user/auth-type`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags User
     * @name UsersControllerChangePassword
     * @summary Обновление данных для входа пользователя(только есть authType = 'email')
     * @request POST:/user/login-details/change
     * @secure
     */
    usersControllerChangePassword: (data: ChangePasswordDto, params: RequestParams = {}) =>
      this.request<UserResponseDto, any>({
        path: `/user/login-details/change`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags User
     * @name UsersControllerCheckPassword
     * @request POST:/user/password/check
     * @secure
     */
    usersControllerCheckPassword: (data: CheckPasswordDto, params: RequestParams = {}) =>
      this.request<PasswordCheckDto, any>({
        path: `/user/password/check`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Генерирует новый пароль для входа по почте и отправляет на email
     *
     * @tags User
     * @name UsersControllerGeneratePasswordForChangingAuthTypeOnEmail
     * @summary Генерация нового пароля для смены типа авторизации(authType) на email
     * @request POST:/user/auth-type/email/password/generate
     * @secure
     */
    usersControllerGeneratePasswordForChangingAuthTypeOnEmail: (data: EmailBodyDto, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/user/auth-type/email/password/generate`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags User
     * @name UsersControllerChangeAuthTypeOnEmail
     * @summary Меняет тип авторизации(authType) на вход по почте(email)
     * @request POST:/user/auth-type/email/change
     * @secure
     */
    usersControllerChangeAuthTypeOnEmail: (data: PasswordBodyDto, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/user/auth-type/email/change`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags User
     * @name UsersControllerSetRating
     * @summary Rate the app
     * @request POST:/user/rating/set-rating
     * @secure
     */
    usersControllerSetRating: (
      query: {
        rating: number;
      },
      params: RequestParams = {},
    ) =>
      this.request<Rating, any>({
        path: `/user/rating/set-rating`,
        method: 'POST',
        query: query,
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Mailer
     * @name MailerControllerSendMail
     * @request PUT:/user/send-feedback
     * @secure
     */
    mailerControllerSendMail: (data: SendMailDto, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/user/send-feedback`,
        method: 'PUT',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Mailer
     * @name MailerControllerSendMailNoAuth
     * @request POST:/user/send-feedback-unauth
     */
    mailerControllerSendMailNoAuth: (data: SendMailDto, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/user/send-feedback-unauth`,
        method: 'POST',
        body: data,
        type: ContentType.FormData,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Mailer
     * @name MailerControllerSendMailNoAuthFromLanding
     * @request POST:/user/test/send-feedback-unauth-from-landing
     */
    mailerControllerSendMailNoAuthFromLanding: (data: SendMailFromLandingBodyDto, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/user/test/send-feedback-unauth-from-landing`,
        method: 'POST',
        body: data,
        type: ContentType.FormData,
        ...params,
      }),
  };
  users = {
    /**
     * No description
     *
     * @tags User
     * @name UserV2ControllerList
     * @request GET:/users
     * @secure
     */
    userV2ControllerList: (
      query?: {
        limit?: number;
        offset?: number;
        search?: string;
        'filters[authTypes]'?: string;
        'orderBy[createdAt]'?: 'DESC' | 'ASC';
        'orderBy[lastActivityAt]'?: 'DESC' | 'ASC';
      },
      params: RequestParams = {},
    ) =>
      this.request<any, ListUserDto>({
        path: `/users`,
        method: 'GET',
        query: query,
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags User
     * @name UserV2ControllerUpdateLastActivity
     * @request POST:/users/{id}:update-activity
     * @secure
     */
    userV2ControllerUpdateLastActivity: (id: number, updateActivity: string, params: RequestParams = {}) =>
      this.request<any, UserDto>({
        path: `/users/${id}${updateActivity}`,
        method: 'POST',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags User
     * @name UserV2ControllerGetProfileV2
     * @summary get user v2
     * @request GET:/users/{id}
     * @secure
     */
    userV2ControllerGetProfileV2: (id: number, params: RequestParams = {}) =>
      this.request<any, UserWithProfileV2Dto>({
        path: `/users/${id}`,
        method: 'GET',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags User
     * @name UserV2ControllerDelete
     * @summary Delete user
     * @request DELETE:/users/{id}
     * @secure
     */
    userV2ControllerDelete: (id: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/users/${id}`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags User
     * @name UserV2ControllerUpdateProfileV2
     * @summary update user profile v2
     * @request PATCH:/users/{id}/profile
     * @secure
     */
    userV2ControllerUpdateProfileV2: (id: number, data: UpdationProfileV2Dto, params: RequestParams = {}) =>
      this.request<any, ProfileV2Dto>({
        path: `/users/${id}/profile`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags User
     * @name UserV2ControllerUpdateChild
     * @summary Обновление профиля ребенка
     * @request PATCH:/users/{id}/children/{childId}
     * @secure
     */
    userV2ControllerUpdateChild: (id: number, childId: number, data: UpdationChildV2Dto, params: RequestParams = {}) =>
      this.request<any, ChildResponseDto>({
        path: `/users/${id}/children/${childId}`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags User
     * @name UserV2ControllerResetChild
     * @summary Сброс профиля и схемы ребенка
     * @request POST:/users/{id}/children/{childId}:reset
     * @secure
     */
    userV2ControllerResetChild: (id: number, childId: number, reset: string, params: RequestParams = {}) =>
      this.request<ChildResponseDto, any>({
        path: `/users/${id}/children/${childId}${reset}`,
        method: 'POST',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags User
     * @name UserProductControllerAdd
     * @summary Добавление продукта в избранное
     * @request POST:/users/{id}/favoriteProducts:add
     * @secure
     */
    userProductControllerAdd: (id: number, add: string, data: CreationFavoriteProductDto, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/users/${id}/favoriteProducts${add}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags User
     * @name UserProductControllerDelete
     * @summary Удаление продукта из избранного
     * @request POST:/users/{id}/favoriteProducts:remove
     * @secure
     */
    userProductControllerDelete: (
      id: number,
      remove: string,
      data: CreationFavoriteProductDto,
      params: RequestParams = {},
    ) =>
      this.request<void, any>({
        path: `/users/${id}/favoriteProducts${remove}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags User
     * @name UserArticleControllerAdd
     * @summary Добавление статьи в избранное
     * @request POST:/users/{id}/favoriteArticles:add
     * @secure
     */
    userArticleControllerAdd: (id: number, add: string, data: CreationFavoriteArticleDto, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/users/${id}/favoriteArticles${add}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags User
     * @name UserArticleControllerDelete
     * @summary Удаление статьи из избранного
     * @request POST:/users/{id}/favoriteArticles:remove
     * @secure
     */
    userArticleControllerDelete: (
      id: number,
      remove: string,
      data: CreationFavoriteArticleDto,
      params: RequestParams = {},
    ) =>
      this.request<void, any>({
        path: `/users/${id}/favoriteArticles${remove}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags User
     * @name UserArticleControllerList
     * @summary Получение избранных статей
     * @request GET:/users/{id}/favoriteArticles
     * @secure
     */
    userArticleControllerList: (
      id: number,
      query?: {
        limit?: number;
        offset?: number;
        search?: string;
        'orderBy[publishedAt]'?: 'DESC' | 'ASC';
        'filters[topics]'?: string;
        'filters[formats]'?: string;
        'filters[publicationStatusId]'?: number;
        /** @example "2023-02-02" */
        'filters[maxPublishedAt]'?: string;
        /** @example "2023-02-02" */
        'filters[minPublishedAt]'?: string;
      },
      params: RequestParams = {},
    ) =>
      this.request<any, ListArticleDto>({
        path: `/users/${id}/favoriteArticles`,
        method: 'GET',
        query: query,
        secure: true,
        ...params,
      }),
  };
  children = {
    /**
     * No description
     *
     * @tags Children
     * @name ChildHeightControllerCreateOrUpdate
     * @request PUT:/children/{childId}/heights/{date}
     * @secure
     */
    childHeightControllerCreateOrUpdate: (
      childId: number,
      date: string,
      data: CreationChildHeightDto,
      params: RequestParams = {},
    ) =>
      this.request<void, any>({
        path: `/children/${childId}/heights/${date}`,
        method: 'PUT',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Children
     * @name ChildHeightControllerDelete
     * @request DELETE:/children/{childId}/heights/{date}
     * @secure
     */
    childHeightControllerDelete: (childId: number, date: string, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/children/${childId}/heights/${date}`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Children
     * @name ChildHeightControllerList
     * @request GET:/children/{childId}/heights
     * @secure
     */
    childHeightControllerList: (
      childId: number,
      query: {
        'orderBy[date]'?: 'DESC' | 'ASC';
        /** @example "2023-02-02" */
        'filters[maxDate]': string;
        /** @example "2023-02-02" */
        'filters[minDate]': string;
      },
      params: RequestParams = {},
    ) =>
      this.request<ListChildHeightDto, any>({
        path: `/children/${childId}/heights`,
        method: 'GET',
        query: query,
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Children
     * @name ChildWeightControllerCreateOrUpdate
     * @request PUT:/children/{childId}/weights/{date}
     * @secure
     */
    childWeightControllerCreateOrUpdate: (
      childId: number,
      date: string,
      data: CreationChildWeightDto,
      params: RequestParams = {},
    ) =>
      this.request<ChildWeight, any>({
        path: `/children/${childId}/weights/${date}`,
        method: 'PUT',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Children
     * @name ChildWeightControllerDelete
     * @request DELETE:/children/{childId}/weights/{date}
     * @secure
     */
    childWeightControllerDelete: (childId: number, date: string, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/children/${childId}/weights/${date}`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Children
     * @name ChildWeightControllerList
     * @request GET:/children/{childId}/weights
     * @secure
     */
    childWeightControllerList: (
      childId: number,
      query: {
        'orderBy[date]'?: 'DESC' | 'ASC';
        /** @example "2023-02-02" */
        'filters[maxDate]': string;
        /** @example "2023-02-02" */
        'filters[minDate]': string;
      },
      params: RequestParams = {},
    ) =>
      this.request<ListChildWeightDto, any>({
        path: `/children/${childId}/weights`,
        method: 'GET',
        query: query,
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Children
     * @name ChildStatisticControllerGetChildStatistic
     * @summary Получение статистики ребенка
     * @request GET:/children/{childId}/statistics
     * @secure
     */
    childStatisticControllerGetChildStatistic: (childId: number, params: RequestParams = {}) =>
      this.request<any, ChildStatisticDto>({
        path: `/children/${childId}/statistics`,
        method: 'GET',
        secure: true,
        ...params,
      }),
  };
  productTypes = {
    /**
     * No description
     *
     * @tags Product types
     * @name ProductTypesControllerGetProductTypes
     * @summary get all product types list
     * @request GET:/product-types
     * @secure
     */
    productTypesControllerGetProductTypes: (params: RequestParams = {}) =>
      this.request<any, ProductTypeBodyDto>({
        path: `/product-types`,
        method: 'GET',
        secure: true,
        ...params,
      }),
  };
  schemas = {
    /**
     * No description
     *
     * @tags Schema
     * @name SchemasControllerGetSchema
     * @summary get schema
     * @request GET:/schemas/{schemaId}
     * @secure
     */
    schemasControllerGetSchema: (schemaId: number, params: RequestParams = {}) =>
      this.request<SchemaResponseDto, any>({
        path: `/schemas/${schemaId}`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Schema
     * @name SchemasControllerExcludeProductType
     * @summary exclude product type
     * @request DELETE:/schemas/{schemaId}/product-types/{productTypeId}
     * @secure
     */
    schemasControllerExcludeProductType: (schemaId: number, productTypeId: number, params: RequestParams = {}) =>
      this.request<ExcludeProductTypeResponseDto, any>({
        path: `/schemas/${schemaId}/product-types/${productTypeId}`,
        method: 'DELETE',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags For test
     * @name SchemasControllerResetSchema
     * @summary Reset custom schema
     * @request POST:/schemas/reset/{schemaId}
     * @secure
     */
    schemasControllerResetSchema: (schemaId: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/schemas/reset/${schemaId}`,
        method: 'POST',
        secure: true,
        ...params,
      }),
  };
  steps = {
    /**
     * No description
     *
     * @tags Steps
     * @name SchemasControllerGetStepProductTypes
     * @summary get product types list for schema step
     * @request GET:/steps/{stepId}/product-types
     * @secure
     */
    schemasControllerGetStepProductTypes: (stepId: number, params: RequestParams = {}) =>
      this.request<StepProductTypeResponseDto[], any>({
        path: `/steps/${stepId}/product-types`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Steps
     * @name SchemasControllerChechReplacedProducts
     * @summary check product can be replaced
     * @request PUT:/steps/{stepId}/check-replaced
     * @secure
     */
    schemasControllerChechReplacedProducts: (stepId: number, params: RequestParams = {}) =>
      this.request<any, CheckReplacedProductResponseDto>({
        path: `/steps/${stepId}/check-replaced`,
        method: 'PUT',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Steps
     * @name SchemasControllerReplaceProduct
     * @summary replace product
     * @request PUT:/steps/{stepId}/replace
     * @secure
     */
    schemasControllerReplaceProduct: (stepId: number, params: RequestParams = {}) =>
      this.request<SchemaResponseDto[], any>({
        path: `/steps/${stepId}/replace`,
        method: 'PUT',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Steps
     * @name SchemasControllerPostponeStep
     * @summary postpone step
     * @request PUT:/steps/{stepId}/postpone
     * @secure
     */
    schemasControllerPostponeStep: (stepId: number, params: RequestParams = {}) =>
      this.request<PostponeStepResponseDto, any>({
        path: `/steps/${stepId}/postpone`,
        method: 'PUT',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Steps
     * @name SchemasControllerReturnPostponedStep
     * @summary return postponed step back
     * @request PUT:/steps/{stepId}/return-postponed
     * @secure
     */
    schemasControllerReturnPostponedStep: (stepId: number, params: RequestParams = {}) =>
      this.request<ReturnPostponedStepResponseDto, any>({
        path: `/steps/${stepId}/return-postponed`,
        method: 'PUT',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Steps
     * @name SchemasControllerCompleteStep
     * @summary Complete step
     * @request PUT:/steps/{stepId}/complete-step
     * @secure
     */
    schemasControllerCompleteStep: (stepId: number, params: RequestParams = {}) =>
      this.request<SchemaResponseDto[], any>({
        path: `/steps/${stepId}/complete-step`,
        method: 'PUT',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Steps
     * @name SchemasControllerAllergenStep
     * @summary Put step into allergens
     * @request PUT:/steps/allergen-step
     * @secure
     */
    schemasControllerAllergenStep: (data: AllergenBodyDto, params: RequestParams = {}) =>
      this.request<SchemaResponseDto, any>({
        path: `/steps/allergen-step`,
        method: 'PUT',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Steps
     * @name SchemasControllerReturnAllergenedStep
     * @summary Return allergened step back
     * @request PUT:/steps/{stepId}/return-allergened
     * @secure
     */
    schemasControllerReturnAllergenedStep: (stepId: number, params: RequestParams = {}) =>
      this.request<SchemaResponseDto, any>({
        path: `/steps/${stepId}/return-allergened`,
        method: 'PUT',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Steps
     * @name SchemasControllerChangeStepAttachedProductType
     * @summary change step attached product type
     * @request PUT:/steps/{stepId}/attached-product-type
     * @secure
     */
    schemasControllerChangeStepAttachedProductType: (
      stepId: number,
      data: ChangeStepAttachedProductTypeBodyDto,
      params: RequestParams = {},
    ) =>
      this.request<ChangeStepAttachedProductTypeResponseDto, any>({
        path: `/steps/${stepId}/attached-product-type`,
        method: 'PUT',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),
  };
  test = {
    /**
     * No description
     *
     * @tags For test
     * @name SchemasControllerPostponeStepForTest
     * @summary postpone step
     * @request PUT:/test/steps/{stepId}/postpone
     * @secure
     */
    schemasControllerPostponeStepForTest: (stepId: number, params: RequestParams = {}) =>
      this.request<PostponedStepsDto, any>({
        path: `/test/steps/${stepId}/postpone`,
        method: 'PUT',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags For test
     * @name SchemasControllerReturnPostponedStepForTest
     * @summary return postponed step back
     * @request PUT:/test/steps/{stepId}/return-postponed
     * @secure
     */
    schemasControllerReturnPostponedStepForTest: (stepId: number, params: RequestParams = {}) =>
      this.request<ReturnPostponedStepResponseDto, any>({
        path: `/test/steps/${stepId}/return-postponed`,
        method: 'PUT',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Return the entity of allergened steps
     *
     * @tags For test
     * @name SchemasControllerAllergenStepForTest
     * @summary Put step into allergens
     * @request PUT:/test/steps/allergen-step
     * @secure
     */
    schemasControllerAllergenStepForTest: (data: AllergenBodyDto, params: RequestParams = {}) =>
      this.request<AllrgenStepsResponseDto, any>({
        path: `/test/steps/allergen-step`,
        method: 'PUT',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Return the entity of allergened steps
     *
     * @tags For test
     * @name SchemasControllerReturnAllergenedStepForTest
     * @summary Return allergened step back
     * @request PUT:/test/steps/{stepId}/return-allergened
     * @secure
     */
    schemasControllerReturnAllergenedStepForTest: (stepId: number, params: RequestParams = {}) =>
      this.request<AllrgenStepsResponseDto, any>({
        path: `/test/steps/${stepId}/return-allergened`,
        method: 'PUT',
        secure: true,
        format: 'json',
        ...params,
      }),
  };
  menu = {
    /**
     * No description
     *
     * @tags Menu
     * @name MenusControllerGetMenu
     * @summary get menu
     * @request GET:/menu
     * @secure
     */
    menusControllerGetMenu: (
      query: {
        schemaId: number;
        /** @format date */
        dateStart: string;
        /** @format date */
        dateEnd: string;
      },
      params: RequestParams = {},
    ) =>
      this.request<MenuDayResponseDto[], any>({
        path: `/menu`,
        method: 'GET',
        query: query,
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Menu
     * @name MenusControllerPauseFeeding
     * @summary pause feeding
     * @request PATCH:/menu/pause/{schemaId}
     * @secure
     */
    menusControllerPauseFeeding: (schemaId: number, data: SchemaPauseBodyDto, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/menu/pause/${schemaId}`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Menu
     * @name MenusControllerUnpauseFeeding
     * @summary unpause feeding
     * @request PATCH:/menu/unpause/{schemaId}
     * @secure
     */
    menusControllerUnpauseFeeding: (schemaId: number, data: SchemaPauseBodyDto, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/menu/unpause/${schemaId}`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Menu
     * @name MenusControllerCheckPauseFeeding
     * @summary check pause feeding
     * @request GET:/menu/check-pause/{schemaId}
     * @secure
     */
    menusControllerCheckPauseFeeding: (schemaId: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/menu/check-pause/${schemaId}`,
        method: 'GET',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Menu
     * @name MenusControllerGetMealtimes
     * @summary get mealtimes
     * @request GET:/menu/mealtimes/{schemaId}
     * @secure
     */
    menusControllerGetMealtimes: (schemaId: number, params: RequestParams = {}) =>
      this.request<MealtimesDto[], any>({
        path: `/menu/mealtimes/${schemaId}`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Menu
     * @name MenusControllerResetMealtimes
     * @summary reset mealtimes
     * @request PATCH:/menu/mealtimes/reset/{schemaId}
     * @secure
     */
    menusControllerResetMealtimes: (schemaId: number, params: RequestParams = {}) =>
      this.request<MealtimesDto[], any>({
        path: `/menu/mealtimes/reset/${schemaId}`,
        method: 'PATCH',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Menu
     * @name MenusControllerChangeMealtime
     * @summary change mealtime
     * @request PATCH:/menu/mealtimes/changeTime/{schemaId}
     * @secure
     */
    menusControllerChangeMealtime: (
      schemaId: number,
      data: ChangeMultipleMealtimesBodyDto,
      params: RequestParams = {},
    ) =>
      this.request<MealtimesDto[], any>({
        path: `/menu/mealtimes/changeTime/${schemaId}`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),
  };
  admin = {
    /**
     * No description
     *
     * @tags Admin
     * @name FilesControllerGetAllChildPhotos
     * @request GET:/admin/photos/children
     */
    filesControllerGetAllChildPhotos: (limit?: number, offset?: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/admin/photos/children`,
        method: 'GET',
        ...params,
      }),
  };
  files = {
    /**
     * No description
     *
     * @tags Files
     * @name FilesControllerCreate
     * @request POST:/files
     */
    filesControllerCreate: (
      data: {
        /** @format binary */
        file: File;
      },
      params: RequestParams = {},
    ) =>
      this.request<any, FileDto>({
        path: `/files`,
        method: 'POST',
        body: data,
        type: ContentType.FormData,
        ...params,
      }),
  };
  products = {
    /**
     * No description
     *
     * @tags Product
     * @name ProductControllerAddStaff
     * @summary Добавление команды к продукту пачкой
     * @request POST:/products/{productId}/staff:batchAdd
     * @secure
     */
    productControllerAddStaff: (
      productId: number,
      batchAdd: string,
      data: DeletionMultipleDto,
      params: RequestParams = {},
    ) =>
      this.request<void, any>({
        path: `/products/${productId}/staff${batchAdd}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Product
     * @name ProductControllerRemoveStaff
     * @summary Открепление команды от продукта пачкой
     * @request POST:/products/{productId}/staff:batchRemove
     * @secure
     */
    productControllerRemoveStaff: (
      productId: number,
      batchRemove: string,
      data: DeletionMultipleDto,
      params: RequestParams = {},
    ) =>
      this.request<void, any>({
        path: `/products/${productId}/staff${batchRemove}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Product
     * @name ProductControllerPublish
     * @summary Публикация продукта
     * @request POST:/products/{productId}:publish
     * @secure
     */
    productControllerPublish: (productId: number, publish: string, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/products/${productId}${publish}`,
        method: 'POST',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Product
     * @name ProductControllerHide
     * @summary Скрытие продукта
     * @request POST:/products/{productId}:hide
     * @secure
     */
    productControllerHide: (productId: number, hide: string, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/products/${productId}${hide}`,
        method: 'POST',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Product
     * @name QuestionControllerList
     * @summary Получение вопросов
     * @request GET:/products/{productId}/questions
     */
    questionControllerList: (productId: number, params: RequestParams = {}) =>
      this.request<any, ListQuestionDto>({
        path: `/products/${productId}/questions`,
        method: 'GET',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Product
     * @name QuestionControllerCreate
     * @summary Добавление вопроса
     * @request POST:/products/{productId}/questions
     * @secure
     */
    questionControllerCreate: (productId: number, data: CreationQuestionDto, params: RequestParams = {}) =>
      this.request<any, QuestionAnswer>({
        path: `/products/${productId}/questions`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Product
     * @name QuestionControllerCreateBatch
     * @summary Добавление вопросов пачкой
     * @request POST:/products/{productId}/questions:batchCreate
     * @secure
     */
    questionControllerCreateBatch: (
      productId: number,
      batchCreate: string,
      data: BatchCreationQuestionDto,
      params: RequestParams = {},
    ) =>
      this.request<
        ActionMultipleResultResponseDto & {
          result?: {
            /** @example true */
            isExecuted?: boolean;
            entity?: QuestionDto;
            /** @example "{ "statusCode": 400, "message": { "propertyName": { "error": "propertyName must be an integer number"}}}" */
            error?: obj | null;
            /**
             * @format integer
             * @example 400
             */
            status?: number | null;
          }[];
        },
        any
      >({
        path: `/products/${productId}/questions${batchCreate}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Product
     * @name QuestionControllerUpdate
     * @summary Обновление вопроса
     * @request PATCH:/products/{productId}/questions/{id}
     * @secure
     */
    questionControllerUpdate: (productId: number, id: number, data: UpdationQuestionDto, params: RequestParams = {}) =>
      this.request<any, QuestionAnswer>({
        path: `/products/${productId}/questions/${id}`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Product
     * @name QuestionControllerDelete
     * @summary Удаление вопроса
     * @request DELETE:/products/{productId}/questions/{id}
     * @secure
     */
    questionControllerDelete: (productId: number, id: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/products/${productId}/questions/${id}`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Product
     * @name QuestionControllerUpdateBatch
     * @summary Обновление вопросов пачкой
     * @request POST:/products/{productId}/questions:batchUpdate
     * @secure
     */
    questionControllerUpdateBatch: (
      productId: number,
      batchUpdate: string,
      data: BatchUpdationQuestionDto,
      params: RequestParams = {},
    ) =>
      this.request<
        ActionMultipleResultResponseDto & {
          result?: {
            /** @example true */
            isExecuted?: boolean;
            entity?: QuestionDto;
            /** @example "{ "statusCode": 400, "message": { "propertyName": { "error": "propertyName must be an integer number"}}}" */
            error?: obj | null;
            /**
             * @format integer
             * @example 400
             */
            status?: number | null;
          }[];
        },
        any
      >({
        path: `/products/${productId}/questions${batchUpdate}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Product
     * @name QuestionControllerDeleteBatch
     * @summary Удаление вопросов пачкой
     * @request POST:/products/{productId}/questions:batchDelete
     * @secure
     */
    questionControllerDeleteBatch: (
      productId: number,
      batchDelete: string,
      data: DeletionMultipleDto,
      params: RequestParams = {},
    ) =>
      this.request<void, any>({
        path: `/products/${productId}/questions${batchDelete}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Product
     * @name ProductMediaControllerCreate
     * @summary Создание превью продукта
     * @request POST:/products/{productId}/media
     * @secure
     */
    productMediaControllerCreate: (productId: number, data: CreationProductMediaDto, params: RequestParams = {}) =>
      this.request<any, ProductMedia>({
        path: `/products/${productId}/media`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Product
     * @name ProductMediaControllerCreateBatch
     * @summary Создание превью продукта пачкой
     * @request POST:/products/{productId}/media:batchCreate
     * @secure
     */
    productMediaControllerCreateBatch: (
      productId: number,
      batchCreate: string,
      data: BatchCreationProductMediaDto,
      params: RequestParams = {},
    ) =>
      this.request<
        ActionMultipleResultResponseDto & {
          result?: {
            /** @example true */
            isExecuted?: boolean;
            entity?: ProductMedia;
            /** @example "{ "statusCode": 400, "message": { "propertyName": { "error": "propertyName must be an integer number"}}}" */
            error?: obj | null;
            /**
             * @format integer
             * @example 400
             */
            status?: number | null;
          }[];
        },
        any
      >({
        path: `/products/${productId}/media${batchCreate}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Product
     * @name ProductMediaControllerUpdate
     * @summary Обновление превью продукта
     * @request PATCH:/products/{productId}/media/{id}
     * @secure
     */
    productMediaControllerUpdate: (
      productId: number,
      id: number,
      data: UpdationProductMediaDto,
      params: RequestParams = {},
    ) =>
      this.request<any, ProductMedia>({
        path: `/products/${productId}/media/${id}`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Product
     * @name ProductMediaControllerUpdateBatch
     * @summary Обновление превью продукта пачкой
     * @request POST:/products/{productId}/media:batchUpdate
     * @secure
     */
    productMediaControllerUpdateBatch: (
      productId: number,
      batchUpdate: string,
      data: BatchUpdationProductMediaDto,
      params: RequestParams = {},
    ) =>
      this.request<
        ActionMultipleResultResponseDto & {
          result?: {
            /** @example true */
            isExecuted?: boolean;
            entity?: ProductMedia;
            /** @example "{ "statusCode": 400, "message": { "propertyName": { "error": "propertyName must be an integer number"}}}" */
            error?: obj | null;
            /**
             * @format integer
             * @example 400
             */
            status?: number | null;
          }[];
        },
        any
      >({
        path: `/products/${productId}/media${batchUpdate}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Product
     * @name ProductMediaControllerDelete
     * @summary Удаление превью продукта
     * @request DELETE:/products/{productId}/media/{mediaId}
     * @secure
     */
    productMediaControllerDelete: (productId: number, mediaId: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/products/${productId}/media/${mediaId}`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Product
     * @name ProductMediaControllerDeleteBatch
     * @summary Удаление превью продукта пачкой
     * @request POST:/products/{productId}/media:batchDelete
     * @secure
     */
    productMediaControllerDeleteBatch: (
      productId: number,
      batchDelete: string,
      data: DeletionMultipleDto,
      params: RequestParams = {},
    ) =>
      this.request<
        ActionMultipleResultResponseDto & {
          result?: {
            /** @example true */
            isExecuted?: boolean;
            /** @example 1 */
            entity?: number;
            /** @example "{ "statusCode": 400, "message": { "propertyName": { "error": "propertyName must be an integer number"}}}" */
            error?: obj | null;
            /**
             * @format integer
             * @example 400
             */
            status?: number | null;
          }[];
        },
        any
      >({
        path: `/products/${productId}/media${batchDelete}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Product
     * @name ProductRatingControllerCreate
     * @request POST:/products/{productId}/ratings
     * @secure
     */
    productRatingControllerCreate: (productId: number, data: CreationRatingDto, params: RequestParams = {}) =>
      this.request<any, RatingDto>({
        path: `/products/${productId}/ratings`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Product
     * @name ProductRatingControllerList
     * @request GET:/products/{productId}/ratings
     */
    productRatingControllerList: (
      productId: number,
      query?: {
        limit?: number;
        offset?: number;
        search?: string;
        'filters[isModerated]'?: boolean;
        'filters[isUserComment]'?: boolean;
        'orderBy[createdAt]'?: 'DESC' | 'ASC';
        'orderBy[rate]'?: 'DESC' | 'ASC';
      },
      params: RequestParams = {},
    ) =>
      this.request<any, RatingDto>({
        path: `/products/${productId}/ratings`,
        method: 'GET',
        query: query,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Product
     * @name ProductRatingControllerUpdate
     * @request PATCH:/products/{productId}/ratings/{id}
     * @secure
     */
    productRatingControllerUpdate: (
      productId: number,
      id: number,
      data: UpdationRatingDto,
      params: RequestParams = {},
    ) =>
      this.request<any, RatingDto>({
        path: `/products/${productId}/ratings/${id}`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Product
     * @name ProductRatingControllerDelete
     * @request DELETE:/products/{productId}/ratings/{id}
     * @secure
     */
    productRatingControllerDelete: (productId: number, id: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/products/${productId}/ratings/${id}`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Product
     * @name ProductRatingControllerGet
     * @request GET:/products/{productId}/ratings/{id}
     */
    productRatingControllerGet: (productId: number, id: number, params: RequestParams = {}) =>
      this.request<any, RatingDto>({
        path: `/products/${productId}/ratings/${id}`,
        method: 'GET',
        ...params,
      }),
  };
  roles = {
    /**
     * No description
     *
     * @tags Roles
     * @name RolesControllerGetAllRoles
     * @summary Получение всех ролей
     * @request GET:/roles
     * @secure
     */
    rolesControllerGetAllRoles: (params: RequestParams = {}) =>
      this.request<Roles[], any>({
        path: `/roles`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Roles
     * @name RolesControllerGetRolesByUser
     * @summary Получение ролей пользователя
     * @request GET:/roles/user
     * @secure
     */
    rolesControllerGetRolesByUser: (params: RequestParams = {}) =>
      this.request<Roles[], any>({
        path: `/roles/user`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Roles
     * @name RolesControllerAddRoleToUser
     * @summary Выдать роль пользователю
     * @request PUT:/roles/user/{id}
     * @secure
     */
    rolesControllerAddRoleToUser: (
      id: number,
      query: {
        roleId: number;
      },
      params: RequestParams = {},
    ) =>
      this.request<void, any>({
        path: `/roles/user/${id}`,
        method: 'PUT',
        query: query,
        secure: true,
        ...params,
      }),
  };
  orders = {
    /**
     * No description
     *
     * @tags Order
     * @name OrderControllerCreateOrder
     * @summary Creating a new order
     * @request POST:/orders
     */
    orderControllerCreateOrder: (data: CreationOrderDto, params: RequestParams = {}) =>
      this.request<any, OrderResponseDto>({
        path: `/orders`,
        method: 'POST',
        body: data,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Order
     * @name OrderControllerList
     * @request GET:/orders
     * @secure
     */
    orderControllerList: (
      query?: {
        limit?: number;
        offset?: number;
        search?: string;
        'filters[requestSources]'?: string;
        'filters[userId]'?: number;
        'filters[statusId]'?: 1 | 2;
        'orderBy[createdAt]'?: 'DESC' | 'ASC';
      },
      params: RequestParams = {},
    ) =>
      this.request<any, ListOrderDto>({
        path: `/orders`,
        method: 'GET',
        query: query,
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Order
     * @name OrderControllerGet
     * @request GET:/orders/{id}
     */
    orderControllerGet: (id: number, params: RequestParams = {}) =>
      this.request<any, OrderV2Dto>({
        path: `/orders/${id}`,
        method: 'GET',
        ...params,
      }),
  };
  ordersCountPrice = {
    /**
     * No description
     *
     * @tags Order
     * @name OrderControllerCountPrice
     * @summary Count price for order
     * @request POST:/orders:countPrice
     */
    orderControllerCountPrice: (countPrice: string, data: OrderCountPriceDto, params: RequestParams = {}) =>
      this.request<any, OrderCountPriceResponseDto>({
        path: `/orders${countPrice}`,
        method: 'POST',
        body: data,
        type: ContentType.Json,
        ...params,
      }),
  };
  ratings = {
    /**
     * No description
     *
     * @tags Marketplace ratings
     * @name MarketplaceRatingControllerList
     * @summary Получение отзывов
     * @request GET:/ratings
     * @secure
     */
    marketplaceRatingControllerList: (
      query?: {
        limit?: number;
        offset?: number;
        search?: string;
        'filters[isModerated]'?: boolean;
        'filters[isUserComment]'?: boolean;
        'orderBy[createdAt]'?: 'DESC' | 'ASC';
        'orderBy[rate]'?: 'DESC' | 'ASC';
      },
      params: RequestParams = {},
    ) =>
      this.request<any, ListRatingDto>({
        path: `/ratings`,
        method: 'GET',
        query: query,
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Marketplace ratings
     * @name MarketplaceRatingControllerModerate
     * @summary Установка отзыва как отмодерированного
     * @request POST:/ratings/{id}:moderate
     * @secure
     */
    marketplaceRatingControllerModerate: (id: number, moderate: string, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/ratings/${id}${moderate}`,
        method: 'POST',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Marketplace ratings
     * @name MarketplaceRatingControllerUnmoderate
     * @summary Установка отзыва как не отмодерированного
     * @request POST:/ratings/{id}:unmoderate
     * @secure
     */
    marketplaceRatingControllerUnmoderate: (id: number, unmoderate: string, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/ratings/${id}${unmoderate}`,
        method: 'POST',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Marketplace ratings
     * @name MarketplaceRatingControllerDelete
     * @summary Удалениe рейтинга
     * @request DELETE:/ratings/{id}
     * @secure
     */
    marketplaceRatingControllerDelete: (id: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/ratings/${id}`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),
  };
  authors = {
    /**
     * No description
     *
     * @tags Authors
     * @name AuthorControllerCreate
     * @summary Добавление автора
     * @request POST:/authors
     * @secure
     */
    authorControllerCreate: (data: CreationAuthorDto, params: RequestParams = {}) =>
      this.request<Author, any>({
        path: `/authors`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Authors
     * @name AuthorControllerUpdate
     * @summary Обновление автора
     * @request PATCH:/authors/{id}
     * @secure
     */
    authorControllerUpdate: (id: number, data: UpdationAuthorDto, params: RequestParams = {}) =>
      this.request<Author, any>({
        path: `/authors/${id}`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Authors
     * @name AuthorControllerDelete
     * @summary Удаление автора
     * @request DELETE:/authors/{id}
     * @secure
     */
    authorControllerDelete: (id: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/authors/${id}`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),
  };
  articles = {
    /**
     * No description
     *
     * @tags Articles
     * @name ArticleControllerList
     * @summary Старый метод для получения статей(не использовать), существует для обратной совместимости
     * @request GET:/articles
     */
    articleControllerList: (params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/articles`,
        method: 'GET',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Articles
     * @name ArticleControllerGetCount
     * @summary Старый метод для получения количеств(не использовать), существует для обратной совместимости
     * @request GET:/articles/count
     */
    articleControllerGetCount: (params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/articles/count`,
        method: 'GET',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Articles
     * @name ArticleControllerListImportant
     * @summary Старый метод для получение важных статей(не использовать), существует для обратной совместимости
     * @request GET:/articles/important
     */
    articleControllerListImportant: (params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/articles/important`,
        method: 'GET',
        ...params,
      }),
  };
  articleFormats = {
    /**
     * No description
     *
     * @tags Article Formats
     * @name ArticleFormatControllerList
     * @summary Получение форматов статей
     * @request GET:/articleFormats
     */
    articleFormatControllerList: (params: RequestParams = {}) =>
      this.request<ListArticleFormatDto, any>({
        path: `/articleFormats`,
        method: 'GET',
        format: 'json',
        ...params,
      }),
  };
  categories = {
    /**
     * @description showUntil должен быть UTC-формате
     *
     * @tags Categories
     * @name CategoryControllerCreate
     * @summary Создание категории
     * @request POST:/categories/category
     */
    categoryControllerCreate: (data: CreationCategoryDto, params: RequestParams = {}) =>
      this.request<any, CategoryDto>({
        path: `/categories/category`,
        method: 'POST',
        body: data,
        type: ContentType.FormData,
        ...params,
      }),

    /**
     * @description showUntil должен быть UTC-формате
     *
     * @tags Categories
     * @name CategoryControllerUpdate
     * @summary Обновление категории
     * @request PATCH:/categories/category/{id}
     */
    categoryControllerUpdate: (id: number, data: UpdationCategoryDto, params: RequestParams = {}) =>
      this.request<any, CategoryDto>({
        path: `/categories/category/${id}`,
        method: 'PATCH',
        body: data,
        type: ContentType.FormData,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Categories
     * @name CategoryControllerDelete
     * @summary Удаление категории
     * @request DELETE:/categories/category/{id}
     */
    categoryControllerDelete: (id: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/categories/category/${id}`,
        method: 'DELETE',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Categories
     * @name CategoryControllerGet
     * @summary Получение категории
     * @request GET:/categories/category/{id}
     */
    categoryControllerGet: (id: number, params: RequestParams = {}) =>
      this.request<any, ResultCategoryDto>({
        path: `/categories/category/${id}`,
        method: 'GET',
        ...params,
      }),

    /**
     * @description Активная категория это категори у которой showUntil = null или showUntl > Current_Timestamp. Активная история это история у которой showUntil = null или showUntil > Current_Timestamp.
     *
     * @tags Categories
     * @name CategoryControllerListActive
     * @summary Получение всех активных категорий с активными историями
     * @request GET:/categories
     */
    categoryControllerListActive: (params: RequestParams = {}) =>
      this.request<any, ListCategoryDto>({
        path: `/categories`,
        method: 'GET',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Categories
     * @name CategoryControllerList
     * @summary Получение всех категорий
     * @request GET:/categories/all
     */
    categoryControllerList: (params: RequestParams = {}) =>
      this.request<any, ListCategoryDto>({
        path: `/categories/all`,
        method: 'GET',
        ...params,
      }),

    /**
     * @description showUntil должен быть UTC-формате
     *
     * @tags Categories
     * @name StoryControllerCreate
     * @summary Создание истории
     * @request POST:/categories/story
     */
    storyControllerCreate: (data: CreationStoryDto, params: RequestParams = {}) =>
      this.request<any, StoryDto>({
        path: `/categories/story`,
        method: 'POST',
        body: data,
        type: ContentType.FormData,
        ...params,
      }),

    /**
     * @description showUntil должен быть UTC-формате
     *
     * @tags Categories
     * @name StoryControllerUpdate
     * @summary Обновление истории
     * @request PATCH:/categories/story/{id}
     */
    storyControllerUpdate: (id: number, data: UpdationStoryDto, params: RequestParams = {}) =>
      this.request<any, StoryDto>({
        path: `/categories/story/${id}`,
        method: 'PATCH',
        body: data,
        type: ContentType.FormData,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Categories
     * @name StoryControllerDelete
     * @summary Удаление истории
     * @request DELETE:/categories/story/{id}
     */
    storyControllerDelete: (id: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/categories/story/${id}`,
        method: 'DELETE',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Categories
     * @name StoryControllerSetViewed
     * @summary Установка истории как просмотренной
     * @request POST:/categories/story/{id}/view
     * @secure
     */
    storyControllerSetViewed: (id: number, params: RequestParams = {}) =>
      this.request<any, ResultStoryDto>({
        path: `/categories/story/${id}/view`,
        method: 'POST',
        secure: true,
        ...params,
      }),
  };
  waysContact = {
    /**
     * No description
     *
     * @tags WayContact
     * @name WayContactControllerCreateWayContact
     * @summary Creating a way contact
     * @request POST:/waysContact
     * @secure
     */
    wayContactControllerCreateWayContact: (data: CreationWayContactDto, params: RequestParams = {}) =>
      this.request<any, WayContactResponseDto>({
        path: `/waysContact`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags WayContact
     * @name WayContactControllerGetAllWaysContact
     * @summary Getting all way contact
     * @request GET:/waysContact
     */
    wayContactControllerGetAllWaysContact: (params: RequestParams = {}) =>
      this.request<any, WaysContactWithCountResponseDto>({
        path: `/waysContact`,
        method: 'GET',
        ...params,
      }),

    /**
     * No description
     *
     * @tags WayContact
     * @name WayContactControllerUpdateWayContact
     * @summary Updating a way contact by the id
     * @request PATCH:/waysContact/wayContact/{id}
     * @secure
     */
    wayContactControllerUpdateWayContact: (id: number, data: UpdationWayContactDto, params: RequestParams = {}) =>
      this.request<any, WayContactResponseDto>({
        path: `/waysContact/wayContact/${id}`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags WayContact
     * @name WayContactControllerGetWayContact
     * @summary Getting a way contact by the id
     * @request GET:/waysContact/wayContact/{id}
     */
    wayContactControllerGetWayContact: (id: number, params: RequestParams = {}) =>
      this.request<any, WayContactResponseDto>({
        path: `/waysContact/wayContact/${id}`,
        method: 'GET',
        ...params,
      }),

    /**
     * No description
     *
     * @tags WayContact
     * @name WayContactControllerDeleteWayContact
     * @summary Deleting a way contact by the id
     * @request DELETE:/waysContact/wayContact/{id}
     * @secure
     */
    wayContactControllerDeleteWayContact: (id: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/waysContact/wayContact/${id}`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),
  };
  registrations = {
    /**
     * No description
     *
     * @tags Registrations
     * @name RegistrationControllerList
     * @request GET:/registrations
     * @secure
     */
    registrationControllerList: (
      query?: {
        limit?: number;
        offset?: number;
        search?: string;
        'orderBy[createdAt]'?: 'DESC' | 'ASC';
      },
      params: RequestParams = {},
    ) =>
      this.request<any, ListRegistrationDto>({
        path: `/registrations`,
        method: 'GET',
        query: query,
        secure: true,
        ...params,
      }),
  };
  applicationPlaces = {
    /**
     * No description
     *
     * @tags ApplicationPlace
     * @name ApplicationPlaceControllerCreate
     * @summary Создание места в приложении
     * @request POST:/applicationPlaces
     */
    applicationPlaceControllerCreate: (data: CreationApplicationPlaceDto, params: RequestParams = {}) =>
      this.request<any, ApplicationPlaceResponseDto>({
        path: `/applicationPlaces`,
        method: 'POST',
        body: data,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags ApplicationPlace
     * @name ApplicationPlaceControllerList
     * @summary Получение списка мест в приложении
     * @request GET:/applicationPlaces
     */
    applicationPlaceControllerList: (params: RequestParams = {}) =>
      this.request<any, ListApplicationPlaceDto>({
        path: `/applicationPlaces`,
        method: 'GET',
        ...params,
      }),

    /**
     * No description
     *
     * @tags ApplicationPlace
     * @name ApplicationPlaceControllerUpdate
     * @summary Обновление места в приложении
     * @request PATCH:/applicationPlaces/applicationPlace/{id}
     */
    applicationPlaceControllerUpdate: (id: number, data: UpdationApplicationPlaceDto, params: RequestParams = {}) =>
      this.request<any, ApplicationPlaceResponseDto>({
        path: `/applicationPlaces/applicationPlace/${id}`,
        method: 'PATCH',
        body: data,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags ApplicationPlace
     * @name ApplicationPlaceControllerGet
     * @summary Получение места в приложении
     * @request GET:/applicationPlaces/applicationPlace/{id}
     */
    applicationPlaceControllerGet: (id: number, params: RequestParams = {}) =>
      this.request<any, ApplicationPlaceResponseDto>({
        path: `/applicationPlaces/applicationPlace/${id}`,
        method: 'GET',
        ...params,
      }),

    /**
     * No description
     *
     * @tags ApplicationPlace
     * @name ApplicationPlaceControllerDelete
     * @summary Удаление места в приложении
     * @request DELETE:/applicationPlaces/applicationPlace/{id}
     */
    applicationPlaceControllerDelete: (id: number, params: RequestParams = {}) =>
      this.request<any, DeleteResult>({
        path: `/applicationPlaces/applicationPlace/${id}`,
        method: 'DELETE',
        ...params,
      }),
  };
  applicationTabs = {
    /**
     * No description
     *
     * @tags ApplicationTabs
     * @name ApplicationTabControllerGet
     * @summary Получение табов для футера приложения
     * @request GET:/applicationTabs
     */
    applicationTabControllerGet: (params: RequestParams = {}) =>
      this.request<ApplicationTabDto, any>({
        path: `/applicationTabs`,
        method: 'GET',
        format: 'json',
        ...params,
      }),
  };
  banners = {
    /**
     * @description Either link or articleId must be given. showUntil should be in UTC format
     *
     * @tags Banners
     * @name BannerControllerCreateBanner
     * @summary Creating a banner
     * @request POST:/banners
     */
    bannerControllerCreateBanner: (data: CreationBannerDto, params: RequestParams = {}) =>
      this.request<any, BannerResponseDto>({
        path: `/banners`,
        method: 'POST',
        body: data,
        type: ContentType.FormData,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Banners
     * @name BannerControllerGetBanners
     * @summary Getting all banners
     * @request GET:/banners
     */
    bannerControllerGetBanners: (
      query?: {
        limit?: number;
        offset?: number;
      },
      params: RequestParams = {},
    ) =>
      this.request<any, WithCountBannersResponseDto>({
        path: `/banners`,
        method: 'GET',
        query: query,
        ...params,
      }),

    /**
     * @description Either link or articleId must be given. showUntil should be in UTC format
     *
     * @tags Banners
     * @name BannerControllerUpdateBanner
     * @summary Updating a banner by the id
     * @request PATCH:/banners/banner/{id}
     */
    bannerControllerUpdateBanner: (id: number, data: UpdationBannerDto, params: RequestParams = {}) =>
      this.request<any, BannerResponseDto>({
        path: `/banners/banner/${id}`,
        method: 'PATCH',
        body: data,
        type: ContentType.FormData,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Banners
     * @name BannerControllerGetBanner
     * @summary Getting a banner by the id
     * @request GET:/banners/banner/{id}
     */
    bannerControllerGetBanner: (id: number, params: RequestParams = {}) =>
      this.request<any, BannerResponseDto>({
        path: `/banners/banner/${id}`,
        method: 'GET',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Banners
     * @name BannerControllerDeleteBanner
     * @summary Deleting a banner by the id
     * @request DELETE:/banners/banner/{id}
     */
    bannerControllerDeleteBanner: (id: number, params: RequestParams = {}) =>
      this.request<any, DeleteResult>({
        path: `/banners/banner/${id}`,
        method: 'DELETE',
        ...params,
      }),

    /**
     * @description Active banner is a banner having showUntil = null or showUntil > CURRENT_TIMESTAMP
     *
     * @tags Banners
     * @name BannerControllerGetActiveBanners
     * @summary Getting active banners
     * @request GET:/banners/active
     */
    bannerControllerGetActiveBanners: (params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/banners/active`,
        method: 'GET',
        ...params,
      }),
  };
  recipes = {
    /**
     * No description
     *
     * @tags Recipes
     * @name RecipesControllerGetRecipes
     * @summary get recipes
     * @request GET:/recipes
     * @secure
     */
    recipesControllerGetRecipes: (
      query?: {
        offset?: number;
        limit?: number;
        search?: string;
      },
      params: RequestParams = {},
    ) =>
      this.request<ListRecipesDto, any>({
        path: `/recipes`,
        method: 'GET',
        query: query,
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Recipes
     * @name RecipesControllerCreateRecipe
     * @summary create recipe
     * @request POST:/recipes
     * @secure
     */
    recipesControllerCreateRecipe: (data: CreationRecipeDto, params: RequestParams = {}) =>
      this.request<GetOneRecipeDto, any>({
        path: `/recipes`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Recipes
     * @name RecipesControllerGetRecipeById
     * @summary get recipe
     * @request GET:/recipes/{id}
     * @secure
     */
    recipesControllerGetRecipeById: (id: number, params: RequestParams = {}) =>
      this.request<GetRecipeByIdDTO, any>({
        path: `/recipes/${id}`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Recipes
     * @name RecipesControllerUpdateRecipe
     * @summary update recipe
     * @request PUT:/recipes/{id}
     * @secure
     */
    recipesControllerUpdateRecipe: (id: number, data: UpdateRecipeDtoBody, params: RequestParams = {}) =>
      this.request<GetOneRecipeDto, any>({
        path: `/recipes/${id}`,
        method: 'PUT',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Recipes
     * @name RecipesControllerDeleteRecipe
     * @summary delete recipe
     * @request DELETE:/recipes/{id}
     * @secure
     */
    recipesControllerDeleteRecipe: (id: number, params: RequestParams = {}) =>
      this.request<ListRecipesDto, any>({
        path: `/recipes/${id}`,
        method: 'DELETE',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Recipes
     * @name RecipesControllerGetOneRecipe
     * @summary get one recipe for admins
     * @request GET:/recipes/recipe/{id}
     * @secure
     */
    recipesControllerGetOneRecipe: (id: number, params: RequestParams = {}) =>
      this.request<GetOneRecipeDto, any>({
        path: `/recipes/recipe/${id}`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Recipes
     * @name RecipesControllerRateRecipe
     * @summary rate recipe
     * @request PUT:/recipes/{id}/rate
     * @secure
     */
    recipesControllerRateRecipe: (
      id: number,
      query: {
        rating: number;
      },
      params: RequestParams = {},
    ) =>
      this.request<void, any>({
        path: `/recipes/${id}/rate`,
        method: 'PUT',
        query: query,
        secure: true,
        ...params,
      }),
  };
  companies = {
    /**
     * No description
     *
     * @tags Company
     * @name CompanyControllerCreate
     * @summary Создание компании
     * @request POST:/companies
     * @secure
     */
    companyControllerCreate: (data: CreationCompanyDto, params: RequestParams = {}) =>
      this.request<any, CompanyDto>({
        path: `/companies`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Company
     * @name CompanyControllerList
     * @summary Получение компании
     * @request GET:/companies
     * @secure
     */
    companyControllerList: (
      query?: {
        limit?: number;
        offset?: number;
        search?: string;
        'orderBy[createdAt]'?: 'DESC' | 'ASC';
        'filters[publicationStatusId]'?: number;
      },
      params: RequestParams = {},
    ) =>
      this.request<any, ListCompanyDto>({
        path: `/companies`,
        method: 'GET',
        query: query,
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Company
     * @name CompanyControllerUpdate
     * @summary Обновление компании
     * @request PATCH:/companies/{id}
     * @secure
     */
    companyControllerUpdate: (id: number, data: CreationCompanyDto, params: RequestParams = {}) =>
      this.request<any, CompanyDto>({
        path: `/companies/${id}`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Company
     * @name CompanyControllerGet
     * @summary Получение компании
     * @request GET:/companies/{id}
     */
    companyControllerGet: (id: number, params: RequestParams = {}) =>
      this.request<any, CompanyDto>({
        path: `/companies/${id}`,
        method: 'GET',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Company
     * @name CompanyControllerSoftDelete
     * @summary (Софт)Удаление компании
     * @request DELETE:/companies/{id}
     * @secure
     */
    companyControllerSoftDelete: (id: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/companies/${id}`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Company
     * @name CompanyControllerPublish
     * @request POST:/companies/{id}:publish
     * @secure
     */
    companyControllerPublish: (id: number, publish: string, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/companies/${id}${publish}`,
        method: 'POST',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Company
     * @name CompanyControllerHide
     * @request POST:/companies/{id}:hide
     * @secure
     */
    companyControllerHide: (id: number, hide: string, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/companies/${id}${hide}`,
        method: 'POST',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Company
     * @name CompanyControllerListProductRatings
     * @summary Получение отзывов продуктов компании
     * @request GET:/companies/{id}/productRatings
     */
    companyControllerListProductRatings: (
      id: number,
      query?: {
        limit?: number;
        offset?: number;
        search?: string;
        'filters[isModerated]'?: boolean;
        'filters[isUserComment]'?: boolean;
        'orderBy[createdAt]'?: 'DESC' | 'ASC';
        'orderBy[rate]'?: 'DESC' | 'ASC';
      },
      params: RequestParams = {},
    ) =>
      this.request<any, ListRatingDto>({
        path: `/companies/${id}/productRatings`,
        method: 'GET',
        query: query,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Company
     * @name CompanyStaffControllerCreate
     * @summary Добавление участинка команды компании
     * @request POST:/companies/{companyId}/staff
     * @secure
     */
    companyStaffControllerCreate: (companyId: number, data: CreationStaffDto, params: RequestParams = {}) =>
      this.request<any, StaffDto>({
        path: `/companies/${companyId}/staff`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Company
     * @name CompanyStaffControllerList
     * @summary Получения списка участников команды компании
     * @request GET:/companies/{companyId}/staff
     */
    companyStaffControllerList: (
      companyId: number,
      query?: {
        limit?: number;
        offset?: number;
      },
      params: RequestParams = {},
    ) =>
      this.request<any, ListStaffDto>({
        path: `/companies/${companyId}/staff`,
        method: 'GET',
        query: query,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Company
     * @name CompanyStaffControllerBatchCreate
     * @summary Добавление участников команды компании пачкой
     * @request POST:/companies/{companyId}/staff:batchCreate
     * @secure
     */
    companyStaffControllerBatchCreate: (
      companyId: number,
      batchCreate: string,
      data: BatchCreationStaffDto,
      params: RequestParams = {},
    ) =>
      this.request<void, any>({
        path: `/companies/${companyId}/staff${batchCreate}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Company
     * @name CompanyStaffControllerUpdate
     * @summary Обновление участинка команды компании
     * @request PATCH:/companies/{companyId}/staff/{id}
     * @secure
     */
    companyStaffControllerUpdate: (companyId: number, id: number, data: UpdationStaffDto, params: RequestParams = {}) =>
      this.request<any, StaffDto>({
        path: `/companies/${companyId}/staff/${id}`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Company
     * @name CompanyStaffControllerDelete
     * @summary Удаление участинка команды компании
     * @request DELETE:/companies/{companyId}/staff/{id}
     * @secure
     */
    companyStaffControllerDelete: (companyId: number, id: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/companies/${companyId}/staff/${id}`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Company
     * @name CompanyStaffControllerBatchUpdate
     * @summary Добавление участинков команды компании пачкой
     * @request POST:/companies/{companyId}/staff:batchUpdate
     * @secure
     */
    companyStaffControllerBatchUpdate: (
      companyId: number,
      batchUpdate: string,
      data: BatchUpdationStaffDto,
      params: RequestParams = {},
    ) =>
      this.request<void, any>({
        path: `/companies/${companyId}/staff${batchUpdate}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Company
     * @name CompanyStaffControllerBatchDelete
     * @summary Добавление участинков команды компании пачкой
     * @request POST:/companies/{companyId}/staff:batchDelete
     * @secure
     */
    companyStaffControllerBatchDelete: (
      companyId: number,
      batchDelete: string,
      data: DeletionMultipleDto,
      params: RequestParams = {},
    ) =>
      this.request<void, any>({
        path: `/companies/${companyId}/staff${batchDelete}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),
  };
  courses = {
    /**
     * No description
     *
     * @tags Course
     * @name CourseContentControllerList
     * @summary Получение содержания курса
     * @request GET:/courses/{courseId}/contents
     */
    courseContentControllerList: (courseId: number, params: RequestParams = {}) =>
      this.request<any, ListCourseContentDto>({
        path: `/courses/${courseId}/contents`,
        method: 'GET',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Course
     * @name CourseContentControllerCreate
     * @summary Создание содержания курса
     * @request POST:/courses/{courseId}/contents
     * @secure
     */
    courseContentControllerCreate: (courseId: number, data: CreationCourseContentDto, params: RequestParams = {}) =>
      this.request<any, CourseContent>({
        path: `/courses/${courseId}/contents`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Course
     * @name CourseContentControllerCreateBatch
     * @summary Создание содержания курса пачкой
     * @request POST:/courses/{courseId}/contents:batchCreate
     * @secure
     */
    courseContentControllerCreateBatch: (
      courseId: number,
      batchCreate: string,
      data: BatchCreationCourseContentDto,
      params: RequestParams = {},
    ) =>
      this.request<
        ActionMultipleResultResponseDto & {
          result?: {
            /** @example true */
            isExecuted?: boolean;
            entity?: CourseContent;
            /** @example "{ "statusCode": 400, "message": { "propertyName": { "error": "propertyName must be an integer number"}}}" */
            error?: obj | null;
            /**
             * @format integer
             * @example 400
             */
            status?: number | null;
          }[];
        },
        any
      >({
        path: `/courses/${courseId}/contents${batchCreate}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Course
     * @name CourseContentControllerUpdate
     * @summary Обновление содержания курса
     * @request PATCH:/courses/{courseId}/contents/{id}
     * @secure
     */
    courseContentControllerUpdate: (
      courseId: number,
      id: number,
      data: UpdationCourseContentDto,
      params: RequestParams = {},
    ) =>
      this.request<any, CourseContent>({
        path: `/courses/${courseId}/contents/${id}`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Course
     * @name CourseContentControllerDelete
     * @summary Удаления содержания курса
     * @request DELETE:/courses/{courseId}/contents/{id}
     * @secure
     */
    courseContentControllerDelete: (courseId: number, id: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/courses/${courseId}/contents/${id}`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Course
     * @name CourseContentControllerUpdateBatch
     * @summary Обновление содержания курса пачкой
     * @request POST:/courses/{courseId}/contents:batchUpdate
     * @secure
     */
    courseContentControllerUpdateBatch: (
      courseId: number,
      batchUpdate: string,
      data: BatchUpdationCourseContentdto,
      params: RequestParams = {},
    ) =>
      this.request<
        ActionMultipleResultResponseDto & {
          result?: {
            /** @example true */
            isExecuted?: boolean;
            entity?: CourseContent;
            /** @example "{ "statusCode": 400, "message": { "propertyName": { "error": "propertyName must be an integer number"}}}" */
            error?: obj | null;
            /**
             * @format integer
             * @example 400
             */
            status?: number | null;
          }[];
        },
        any
      >({
        path: `/courses/${courseId}/contents${batchUpdate}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Course
     * @name CourseContentControllerDeleteBatch
     * @summary Удаление содержания курса пачкой
     * @request POST:/courses/{courseId}/contents:batchDelete
     * @secure
     */
    courseContentControllerDeleteBatch: (
      courseId: number,
      batchDelete: string,
      data: DeletionMultipleDto,
      params: RequestParams = {},
    ) =>
      this.request<
        ActionMultipleResultResponseDto & {
          result?: {
            /** @example true */
            isExecuted?: boolean;
            /** @example 1 */
            entity?: number;
            /** @example "{ "statusCode": 400, "message": { "propertyName": { "error": "propertyName must be an integer number"}}}" */
            error?: obj | null;
            /**
             * @format integer
             * @example 400
             */
            status?: number | null;
          }[];
        },
        any
      >({
        path: `/courses/${courseId}/contents${batchDelete}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Course
     * @name CourseAttachmentControllerList
     * @summary Получение активных(delete_at = null) вложений курса
     * @request GET:/courses/{courseId}/attachments
     * @secure
     */
    courseAttachmentControllerList: (courseId: number, params: RequestParams = {}) =>
      this.request<any, ListCourseAttachmentDto>({
        path: `/courses/${courseId}/attachments`,
        method: 'GET',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Course
     * @name CourseAttachmentControllerCreate
     * @summary Создание вложения курса
     * @request POST:/courses/{courseId}/attachments
     * @secure
     */
    courseAttachmentControllerCreate: (
      courseId: number,
      data: CreationCourseAttachmentDto,
      params: RequestParams = {},
    ) =>
      this.request<any, CourseAttachment>({
        path: `/courses/${courseId}/attachments`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Course
     * @name CourseAttachmentControllerBatchCreate
     * @summary Создание вложения курса пачкой
     * @request POST:/courses/{courseId}/attachments:batchCreate
     * @secure
     */
    courseAttachmentControllerBatchCreate: (
      courseId: number,
      batchCreate: string,
      data: BatchCreationCourseAttachmentDto,
      params: RequestParams = {},
    ) =>
      this.request<
        ActionMultipleResultResponseDto & {
          result?: {
            /** @example true */
            isExecuted?: boolean;
            entity?: CourseAttachment;
            /** @example "{ "statusCode": 400, "message": { "propertyName": { "error": "propertyName must be an integer number"}}}" */
            error?: obj | null;
            /**
             * @format integer
             * @example 400
             */
            status?: number | null;
          }[];
        },
        any
      >({
        path: `/courses/${courseId}/attachments${batchCreate}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Course
     * @name CourseAttachmentControllerSoftDelete
     * @summary (Софт)Удаление вложения курса
     * @request DELETE:/courses/{courseId}/attachments/{attachmentId}
     * @secure
     */
    courseAttachmentControllerSoftDelete: (attachmentId: number, courseId: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/courses/${courseId}/attachments/${attachmentId}`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Course
     * @name CourseAttachmentControllerBatchSoftDelete
     * @summary (Софт)Удаление вложения курса пачкой
     * @request POST:/courses/{courseId}/attachments:batchDelete
     * @secure
     */
    courseAttachmentControllerBatchSoftDelete: (
      courseId: number,
      batchDelete: string,
      data: DeletionMultipleDto,
      params: RequestParams = {},
    ) =>
      this.request<
        ActionMultipleResultResponseDto & {
          result?: {
            /** @example true */
            isExecuted?: boolean;
            /** @example 1 */
            entity?: number;
            /** @example "{ "statusCode": 400, "message": { "propertyName": { "error": "propertyName must be an integer number"}}}" */
            error?: obj | null;
            /**
             * @format integer
             * @example 400
             */
            status?: number | null;
          }[];
        },
        any
      >({
        path: `/courses/${courseId}/attachments${batchDelete}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Course
     * @name CourseV2ControllerCreate
     * @summary Создание курса
     * @request POST:/courses
     * @secure
     */
    courseV2ControllerCreate: (data: CreationCourseDto, params: RequestParams = {}) =>
      this.request<any, CourseDto>({
        path: `/courses`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Course
     * @name CourseV2ControllerList
     * @summary Получение списка курсов
     * @request GET:/courses
     */
    courseV2ControllerList: (
      query?: {
        limit?: number;
        offset?: number;
        search?: string;
        'orderBy[order]'?: 'DESC' | 'ASC';
        'orderBy[price]'?: 'DESC' | 'ASC';
        'orderBy[publishedAt]'?: 'DESC' | 'ASC';
        'filters[topics]'?: string;
        'filters[formats]'?: string;
        'filters[companyId]'?: number;
        'filters[publicationStatusId]'?: number;
        'filters[companyPublicationStatusId]'?: number;
        'filters[favorite]'?: boolean;
        /** @example "2023-02-02" */
        'filters[maxPublishedAt]'?: string;
        /** @example "2023-02-02" */
        'filters[minPublishedAt]'?: string;
      },
      params: RequestParams = {},
    ) =>
      this.request<any, ListCourseDto>({
        path: `/courses`,
        method: 'GET',
        query: query,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Course
     * @name CourseV2ControllerUpdate
     * @summary Обновление курса
     * @request PATCH:/courses/{id}
     * @secure
     */
    courseV2ControllerUpdate: (id: number, data: UpdationCourseDto, params: RequestParams = {}) =>
      this.request<any, CourseDto>({
        path: `/courses/${id}`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Course
     * @name CourseV2ControllerSoftDelete
     * @summary (Софт) Удаление курса
     * @request DELETE:/courses/{id}
     * @secure
     */
    courseV2ControllerSoftDelete: (id: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/courses/${id}`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Course
     * @name CourseV2ControllerGet
     * @summary Получение курса
     * @request GET:/courses/{id}
     */
    courseV2ControllerGet: (id: number, params: RequestParams = {}) =>
      this.request<any, CourseDto>({
        path: `/courses/${id}`,
        method: 'GET',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Course
     * @name CourseV2ControllerAddTopics
     * @summary Добавление тем к курсу пачкой
     * @request POST:/courses/{id}/topics:batchAdd
     * @secure
     */
    courseV2ControllerAddTopics: (
      id: number,
      batchAdd: string,
      data: DeletionMultipleDto,
      params: RequestParams = {},
    ) =>
      this.request<void, any>({
        path: `/courses/${id}/topics${batchAdd}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Course
     * @name CourseV2ControllerRemoveTopics
     * @summary Открепление тем от курса пачкой
     * @request POST:/courses/{id}/topics:batchRemove
     * @secure
     */
    courseV2ControllerRemoveTopics: (
      id: number,
      batchRemove: string,
      data: DeletionMultipleDto,
      params: RequestParams = {},
    ) =>
      this.request<void, any>({
        path: `/courses/${id}/topics${batchRemove}`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),
  };
  courseFormats = {
    /**
     * No description
     *
     * @tags Course formats
     * @name CourseFormatControllerList
     * @request GET:/course-formats
     */
    courseFormatControllerList: (params: RequestParams = {}) =>
      this.request<any, ListCourseFormatDto>({
        path: `/course-formats`,
        method: 'GET',
        ...params,
      }),
  };
  topics = {
    /**
     * No description
     *
     * @tags Topics
     * @name TopicControllerList
     * @request GET:/topics
     */
    topicControllerList: (params: RequestParams = {}) =>
      this.request<any, ListTopicDto>({
        path: `/topics`,
        method: 'GET',
        ...params,
      }),
  };
  paymentWidget = {
    /**
     * No description
     *
     * @tags Payment
     * @name PaymentControllerGetPaymentWidgetTinkoff
     * @request GET:/payment-widget/tinkoff
     */
    paymentControllerGetPaymentWidgetTinkoff: (
      query: {
        orderId: number;
      },
      params: RequestParams = {},
    ) =>
      this.request<void, any>({
        path: `/payment-widget/tinkoff`,
        method: 'GET',
        query: query,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Payment
     * @name PaymentControllerCallbackPaymentWidgetTinkoff
     * @request POST:/payment-widget/tinkoff
     */
    paymentControllerCallbackPaymentWidgetTinkoff: (data: TinkoffCallbackBodyDto, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/payment-widget/tinkoff`,
        method: 'POST',
        body: data,
        type: ContentType.Json,
        ...params,
      }),
  };
  payment = {
    /**
     * No description
     *
     * @tags Payment
     * @name PaymentControllerPayForOrder
     * @summary Payment for an order whose price is zero
     * @request POST:/payment/order/{id}/pay
     */
    paymentControllerPayForOrder: (id: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/payment/order/${id}/pay`,
        method: 'POST',
        ...params,
      }),
  };
  promocodes = {
    /**
     * No description
     *
     * @tags Promocodes
     * @name PromocodeControllerCreate
     * @summary Создание промокода
     * @request POST:/promocodes
     * @secure
     */
    promocodeControllerCreate: (data: CreationPromocodeDto, params: RequestParams = {}) =>
      this.request<PromocodeDto, any>({
        path: `/promocodes`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Promocodes
     * @name PromocodeControllerList
     * @summary Получение списка промокодов
     * @request GET:/promocodes
     * @secure
     */
    promocodeControllerList: (
      query?: {
        limit?: number;
        offset?: number;
        search?: string;
        'orderBy[endDate]'?: 'DESC' | 'ASC';
        'orderBy[usageCounter]'?: 'DESC' | 'ASC';
      },
      params: RequestParams = {},
    ) =>
      this.request<ListPromocodeDto, any>({
        path: `/promocodes`,
        method: 'GET',
        query: query,
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Promocodes
     * @name PromocodeControllerUpdate
     * @summary Обновление промокода
     * @request PATCH:/promocodes/{id}
     * @secure
     */
    promocodeControllerUpdate: (id: number, data: UpdationPromocodeDto, params: RequestParams = {}) =>
      this.request<PromocodeDto, any>({
        path: `/promocodes/${id}`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags Promocodes
     * @name PromocodeControllerDelete
     * @summary Удаление промокода
     * @request DELETE:/promocodes/{id}
     * @secure
     */
    promocodeControllerDelete: (id: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/promocodes/${id}`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),
  };
  promocodeTypes = {
    /**
     * No description
     *
     * @tags Promocode Types
     * @name PromocodeTypeControllerList
     * @summary Получение типов промокодов
     * @request GET:/promocodeTypes
     */
    promocodeTypeControllerList: (params: RequestParams = {}) =>
      this.request<ListPromocodeTypeDto, any>({
        path: `/promocodeTypes`,
        method: 'GET',
        format: 'json',
        ...params,
      }),
  };
  promocodeAccessTypes = {
    /**
     * No description
     *
     * @tags Promocode Access Types
     * @name PromocodeAccessTypeControllerList
     * @summary Получение типов доступа промокодов
     * @request GET:/promocodeAccessTypes
     */
    promocodeAccessTypeControllerList: (params: RequestParams = {}) =>
      this.request<ListPromocodeAccessTypeDto, any>({
        path: `/promocodeAccessTypes`,
        method: 'GET',
        format: 'json',
        ...params,
      }),
  };
  statistics = {
    /**
     * No description
     *
     * @tags Statistics
     * @name StatisticsControllerList
     * @request GET:/statistics
     * @secure
     */
    statisticsControllerList: (
      query: {
        'filters[period]': 'all' | 'year' | 'month' | 'week' | 'yesterday' | 'day';
      },
      params: RequestParams = {},
    ) =>
      this.request<any, ListStatisticsDto>({
        path: `/statistics`,
        method: 'GET',
        query: query,
        secure: true,
        ...params,
      }),
  };
  avatars = {
    /**
     * No description
     *
     * @tags Avatars
     * @name AvatarControllerCreateAvatar
     * @summary Adding file to avatar list
     * @request POST:/avatars
     * @secure
     */
    avatarControllerCreateAvatar: (data: CreationAvatarDto, params: RequestParams = {}) =>
      this.request<any, AvatarDto>({
        path: `/avatars`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Avatars
     * @name AvatarControllerList
     * @summary Getting list of avatars
     * @request GET:/avatars
     * @secure
     */
    avatarControllerList: (params: RequestParams = {}) =>
      this.request<any, ListAvatarDto>({
        path: `/avatars`,
        method: 'GET',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Avatars
     * @name AvatarControllerDelete
     * @summary Delete avatar from list
     * @request DELETE:/avatars/{id}
     * @secure
     */
    avatarControllerDelete: (id: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/avatars/${id}`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),
  };
  cities = {
    /**
     * No description
     *
     * @tags Cities
     * @name CityControllerList
     * @summary Получение списка городов
     * @request GET:/cities
     * @secure
     */
    cityControllerList: (
      query?: {
        limit?: number;
        offset?: number;
        search?: string;
      },
      params: RequestParams = {},
    ) =>
      this.request<any, ListCityDto>({
        path: `/cities`,
        method: 'GET',
        query: query,
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Cities
     * @name CityControllerCreateCity
     * @summary Добавление города в список админом
     * @request POST:/cities
     * @secure
     */
    cityControllerCreateCity: (data: CreationCityDto, params: RequestParams = {}) =>
      this.request<any, CityDto>({
        path: `/cities`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        ...params,
      }),

    /**
     * No description
     *
     * @tags Cities
     * @name CityControllerDelete
     * @summary Удаление города из списка
     * @request DELETE:/cities/{id}
     * @secure
     */
    cityControllerDelete: (id: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/cities/${id}`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),
  };
}
